diff --git a/bin/linux/athrill b/bin/linux/athrill index 0777e6c5..f4914557 100755 Binary files a/bin/linux/athrill and b/bin/linux/athrill differ diff --git a/sample/barmetal/step6/arg_sakura.txt b/sample/barmetal/step6/arg_sakura.txt index e6c8c051..e94933b2 100644 --- a/sample/barmetal/step6/arg_sakura.txt +++ b/sample/barmetal/step6/arg_sakura.txt @@ -1,2 +1,2 @@ --l 42 ./main.c +-l 9 ./vector.S diff --git a/trunk/src/bin/athrill b/trunk/src/bin/athrill index 0777e6c5..f4914557 100755 Binary files a/trunk/src/bin/athrill and b/trunk/src/bin/athrill differ diff --git a/trunk/src/main/option/option.c b/trunk/src/main/option/option.c index 39b14dc7..040bf0ea 100644 --- a/trunk/src/main/option/option.c +++ b/trunk/src/main/option/option.c @@ -100,7 +100,10 @@ CmdOptionType *parse_args(int argc, const char* argv[]) printf("t = %llu\n", cmd_option.timeout); printf("p = %s\n", (cmd_option.fifocfgpath != NULL) ? cmd_option.fifocfgpath : "NULL"); #endif - + if (optind >= argc) { + printf("ERROR: not found \n"); + return NULL; + } memcpy(cmd_option.load_file.filepath.str, argv[optind], strlen(argv[optind])); cmd_option.load_file.filepath.str[strlen(argv[optind])] = '\0'; cmd_option.load_file.filepath.len = strlen(argv[optind]);