Skip to content

Commit

Permalink
mrbc: use binary mode on outfile
Browse files Browse the repository at this point in the history
This solves the problem of incorrect bytecode generated by mrbc
for single files on Windows platform (which is by default text-mode)
  • Loading branch information
luislavena committed May 18, 2013
1 parent bb59d6e commit 0fc9064
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/mrbc/mrbc.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0fc9064

Please sign in to comment.