kopia lustrzana https://github.com/stlink-org/stlink
Only call strtoul when there is an argument that strtoul can work on
rodzic
592276c939
commit
2edd0530a6
|
|
@ -48,8 +48,8 @@ static int get_opts(struct opts* o, int ac, char** av)
|
|||
o->devname = av[1];
|
||||
i = 1;
|
||||
}
|
||||
|
||||
o->size = strtoul(av[i + 3], NULL, 16);
|
||||
if (ac > 3)
|
||||
o->size = strtoul(av[i + 3], NULL, 16);
|
||||
}
|
||||
else if (strcmp(av[0], "write") == 0)
|
||||
{
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue