Avoid cryptic message when survey's first argument is empty
Catch empty argument instead of letting nstr_comp_val() choke on it.
This commit is contained in:
parent
4646dfbf80
commit
05364c0f68
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ surv(void)
|
|||
|
||||
nsect = 0;
|
||||
ptr = getstarg(player->argp[1], "commodity or variable? ", buf);
|
||||
if (ptr == 0)
|
||||
if (!ptr || !*ptr)
|
||||
return RET_SYN;
|
||||
ptr = nstr_comp_val(ptr, &val, EF_SECTOR);
|
||||
if (!ptr)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue