Commit 0fc9064c authored by Luis Lavena's avatar Luis Lavena

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)
parent bb59d6ec
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment