misc: Fix argument handling for m5 initparam util

This commit is contained in:
Gabor Dozsa 2016-03-16 16:23:42 +00:00
parent f9cae4ae58
commit d4c1600c4e

View file

@ -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;