(cons_choose): When an argument is bad, do not loop prompting, just
fail. That's what the vast majority of commands do.
This commit is contained in:
parent
d575d779ad
commit
f3fb9c3c4e
1 changed files with 2 additions and 8 deletions
|
@ -174,14 +174,8 @@ cons_choose(struct ltcomstr *ltcp)
|
|||
}
|
||||
ltcp->mailee = (ltcp->proposer == player->cnum)
|
||||
? ltcp->proposee : ltcp->proposer;
|
||||
while ((p =
|
||||
getstarg(player->argp[3], "Accept, decline or postpone? ",
|
||||
buf)) && *p) {
|
||||
if (*p == 'a' || *p == 'd' || *p == 'p')
|
||||
break;
|
||||
player->argp[3] = 0;
|
||||
}
|
||||
if (p == 0 || *p == 0)
|
||||
p = getstarg(player->argp[3], "Accept, decline or postpone? ", buf);
|
||||
if (!p || (*p != 'a' && *p != 'd' && *p != 'p'))
|
||||
return RET_SYN;
|
||||
ltcp->op = *p;
|
||||
return RET_OK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue