diff options
author | Gabor Dozsa <gabor.dozsa@arm.com> | 2016-03-16 16:23:42 +0000 |
---|---|---|
committer | Gabor Dozsa <gabor.dozsa@arm.com> | 2016-03-16 16:23:42 +0000 |
commit | d4c1600c4e3e4f380f5582f8bfba97fb466a18ce (patch) | |
tree | 67fba5f0afa88080acfcdfc2836b0e28e2dee904 /util | |
parent | f9cae4ae583fb68e92f52df9f5ab8d02271dfea9 (diff) | |
download | gem5-d4c1600c4e3e4f380f5582f8bfba97fb466a18ce.tar.xz |
misc: Fix argument handling for m5 initparam util
Diffstat (limited to 'util')
-rw-r--r-- | util/m5/m5.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |