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

This commit is contained in:
Yukihiro Matsumoto
2012-05-17 23:49:12 +09:00
2 changed files with 5 additions and 1 deletions
+3
View File
@@ -19,3 +19,6 @@ cscope.out
/bin
/mrblib/mrblib.c
/mrblib/*.*tmp
/test/mrbtest
/test/mrbtest.c
/test/*.*tmp
+2 -1
View File
@@ -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;
}