(edit): Crashed when country argument didn't name a country. Fix &
simplify. Reported by Pat Loney.
This commit is contained in:
parent
44a5e5d65a
commit
a8e2df3ad8
1 changed files with 2 additions and 5 deletions
|
@ -108,12 +108,9 @@ edit(void)
|
|||
return RET_FAIL;
|
||||
break;
|
||||
case 'c':
|
||||
if (!(ptr = getstarg(player->argp[2], "Country number? ", buf)))
|
||||
np = natargp(player->argp[2], "Country? ");
|
||||
if (!np)
|
||||
return RET_SYN;
|
||||
if (isdigit(*ptr))
|
||||
np = getnatp(atoi(ptr));
|
||||
else
|
||||
np = natargp(ptr, NULL);
|
||||
break;
|
||||
case 'p':
|
||||
if ((num = onearg(player->argp[2], "Plane number? ")) < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue