diff options
| author | take-cheeze <[email protected]> | 2019-12-23 21:01:42 +0900 |
|---|---|---|
| committer | take-cheeze <[email protected]> | 2019-12-23 21:01:42 +0900 |
| commit | bb0aec1d949c075e86c2f88a73975b615f5dc247 (patch) | |
| tree | e34bf5de13153c8e1c5fe5c45ee0ebf04bb70453 | |
| parent | 10e9f193ca93677e365a7e616439eec277b6c71c (diff) | |
| download | mruby-bb0aec1d949c075e86c2f88a73975b615f5dc247.tar.gz mruby-bb0aec1d949c075e86c2f88a73975b615f5dc247.zip | |
Use binary mode in mrbc source code reading
| -rw-r--r-- | mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c b/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c index 4c8c680cb..716b79c88 100644 --- a/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c +++ b/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c @@ -183,7 +183,7 @@ partial_hook(struct mrb_parser_state *p) return -1; } fn = args->argv[args->idx++]; - p->f = fopen(fn, "r"); + p->f = fopen(fn, "rb"); if (p->f == NULL) { fprintf(stderr, "%s: cannot open program file. (%s)\n", args->prog, fn); return -1; @@ -210,7 +210,7 @@ load_file(mrb_state *mrb, struct mrbc_args *args) } else { need_close = TRUE; - if ((infile = fopen(input, "r")) == NULL) { + if ((infile = fopen(input, "rb")) == NULL) { fprintf(stderr, "%s: cannot open program file. (%s)\n", args->prog, input); return mrb_nil_value(); } |
