mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
vkd3d-dxbc: Close output files after writing them.
This commit is contained in:
parent
8653ce17cf
commit
2712a79c55
Notes:
Alexandre Julliard
2024-04-04 22:42:25 +02:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/755
@ -514,6 +514,7 @@ int main(int argc, char **argv)
|
||||
FILE *input, *output;
|
||||
char *messages;
|
||||
uint32_t flags;
|
||||
bool success;
|
||||
int fail = 1;
|
||||
size_t i;
|
||||
int ret;
|
||||
@ -583,18 +584,15 @@ int main(int argc, char **argv)
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!write_output(output, &serialized))
|
||||
{
|
||||
if (!(success = write_output(output, &serialized)))
|
||||
fprintf(stderr, "Failed to write output blob.\n");
|
||||
vkd3d_shader_free_shader_code(&serialized);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (close_output)
|
||||
fclose(output);
|
||||
vkd3d_shader_free_shader_code(&serialized);
|
||||
if (!success)
|
||||
goto done;
|
||||
break;
|
||||
|
||||
default:
|
||||
vkd3d_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
@ -605,7 +603,5 @@ done:
|
||||
free(options.actions);
|
||||
if (close_input)
|
||||
fclose(input);
|
||||
if (close_output)
|
||||
fclose(output);
|
||||
return fail;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user