open generated files as binary so we have consistent line endings across

Linux and Windows
This commit is contained in:
Nikita Smith
2026-06-02 12:10:33 -07:00
committed by Ryan Fleury
parent 5089a01058
commit 9447cce94d
+2 -2
View File
@@ -533,7 +533,7 @@ entry_point(CmdLine *cmdline)
c_path = push_str8f(mg_arena, "%S/%S", layer_generated_folder, str8_skip_last_slash(layer->c_name_override));
}
{
FILE *h = fopen((char *)h_path.str, "w");
FILE *h = fopen((char *)h_path.str, "wb");
fprintf(h, "// Copyright (c) Epic Games Tools\n");
fprintf(h, "// Licensed under the MIT license (https://opensource.org/license/mit/)\n\n");
if(layer->h_header.first == 0)
@@ -589,7 +589,7 @@ entry_point(CmdLine *cmdline)
fclose(h);
}
{
FILE *c = fopen((char *)c_path.str, "w");
FILE *c = fopen((char *)c_path.str, "wb");
fprintf(c, "// Copyright (c) Epic Games Tools\n");
fprintf(c, "// Licensed under the MIT license (https://opensource.org/license/mit/)\n\n");
if(layer->c_header.first == 0)