summaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorLuis Lavena <[email protected]>2013-05-18 12:21:03 -0300
committerLuis Lavena <[email protected]>2013-05-18 12:24:54 -0300
commit0fc9064c59fef34d68b921d6eaae035d5d435a12 (patch)
tree9503789422123da0b845095a43ccfca051db6201 /tools
parentbb59d6ec029f3fb6e6ad82fb531a7edd348601b8 (diff)
downloadmruby-0fc9064c59fef34d68b921d6eaae035d5d435a12.tar.gz
mruby-0fc9064c59fef34d68b921d6eaae035d5d435a12.zip
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)
Diffstat (limited to 'tools')
-rw-r--r--tools/mrbc/mrbc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/mrbc/mrbc.c b/tools/mrbc/mrbc.c
index 3bf6678f6..0a165b78a 100644
--- a/tools/mrbc/mrbc.c
+++ b/tools/mrbc/mrbc.c
@@ -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;
}