Commit e67c0352 authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

Merge branch 'master' of github.com:mruby/mruby

parents 0a00c28c 069768b7
......@@ -19,3 +19,6 @@ cscope.out
/bin
/mrblib/mrblib.c
/mrblib/*.*tmp
/test/mrbtest
/test/mrbtest.c
/test/*.*tmp
......@@ -105,7 +105,8 @@ parse_args(mrb_state *mrb, int argc, char **argv, struct _args *args)
}
if (args->rfp == NULL && args->cmdline == NULL && (args->rfp = fopen(*argv, args->mrbfile ? "rb" : "r")) == NULL) {
if (args->rfp == NULL && args->cmdline == NULL &&
(*argv == NULL || (args->rfp = fopen(*argv, args->mrbfile ? "rb" : "r")) == NULL)) {
printf("%s: Cannot open program file. (%s)\n", *origargv, *argv);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment