diff --git a/src/metagen/metagen_main.c b/src/metagen/metagen_main.c index 9d9a1e78..52393377 100644 --- a/src/metagen/metagen_main.c +++ b/src/metagen/metagen_main.c @@ -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)