From: Gabor Dozsa Date: Wed, 16 Mar 2016 16:23:42 +0000 (+0000) Subject: misc: Fix argument handling for m5 initparam util X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d4c1600c4e3e4f380f5582f8bfba97fb466a18ce;p=gem5.git misc: Fix argument handling for m5 initparam util --- diff --git a/util/m5/m5.c b/util/m5/m5.c index f773153da..118ac9447 100644 --- a/util/m5/m5.c +++ b/util/m5/m5.c @@ -86,7 +86,7 @@ parse_int_args(int argc, char *argv[], uint64_t ints[], int len) void parse_str_args_to_regs(int argc, char *argv[], uint64_t regs[], int len) { - if (argc > 1 || strlen(argv[0]) > len * sizeof(uint64_t)) + if (argc > 1 || (argc > 0 && strlen(argv[0]) > len * sizeof(uint64_t))) usage(); int i;