mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mrbc: use binary mode on outfile
This solves the problem of incorrect bytecode generated by mrbc for single files on Windows platform (which is by default text-mode)
This commit is contained in:
+1
-1
@@ -282,7 +282,7 @@ main(int argc, char **argv)
|
||||
if (strcmp("-", args.outfile) == 0) {
|
||||
wfp = stdout;
|
||||
}
|
||||
else if ((wfp = fopen(args.outfile, "w")) == NULL) {
|
||||
else if ((wfp = fopen(args.outfile, "wb")) == NULL) {
|
||||
fprintf(stderr, "%s: cannot open output file:(%s)\n", args.prog, args.outfile);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user