From 0fc9064c59fef34d68b921d6eaae035d5d435a12 Mon Sep 17 00:00:00 2001 From: Luis Lavena Date: Sat, 18 May 2013 12:21:03 -0300 Subject: 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) --- tools/mrbc/mrbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') 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; } -- cgit v1.2.3