Get third argument of "order l" the ordinary way
Now prompts when the argument is empty. Before, that was interpreted as zero. Not likely to affect players.
This commit is contained in:
parent
ae6ad76516
commit
7ac10453a2
1 changed files with 4 additions and 8 deletions
|
@ -166,14 +166,10 @@ orde(void)
|
|||
|
||||
case 'l':
|
||||
/* convert player->argp[3] to an integer */
|
||||
if (player->argp[3])
|
||||
sub = atoi(player->argp[3]);
|
||||
else {
|
||||
sprintf(buf1, "Field (1-%d) ", TMAX);
|
||||
if (!getstarg(player->argp[3], buf1, buf))
|
||||
return RET_SYN;
|
||||
sub = atoi(buf);
|
||||
}
|
||||
/* check to make sure value in within range. */
|
||||
if (sub > TMAX || sub < 1) {
|
||||
pr("Value must range from 1 to %d\n", TMAX);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue