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:
Luis Lavena
2013-05-18 12:21:03 -03:00
parent bb59d6ec02
commit 0fc9064c59
+1 -1
View File
@@ -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;
}