Skip to content

Commit 0a3ea51

Browse files
committed
fix: klangc unable to correctly dump bytecode files containing the character '\n'
1 parent 38e3a7c commit 0a3ea51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/klangc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static int klc_parse_argv(int argc, char** argv, KlCBehaviour* behaviour) {
9090
}
9191
if (behaviour->dumpoutput)
9292
ko_delete(behaviour->dumpoutput);
93-
behaviour->dumpoutput = kofile_create(argv[++i], "w");
93+
behaviour->dumpoutput = kofile_create(argv[++i], "wb");
9494
if (kl_unlikely(!behaviour->dumpoutput)) {
9595
fprintf(stderr, "failed to open file: %s\n", argv[i]);
9696
klc_cleanbehaviour(behaviour);

0 commit comments

Comments
 (0)