(prmptrd, uprmptrd): Should not be called while player->aborted. Check.
This commit is contained in:
parent
5100e522fe
commit
fee8ac9d8f
1 changed files with 9 additions and 0 deletions
|
@ -358,6 +358,12 @@ prmptrd(char *prompt, char *buf, int size)
|
|||
{
|
||||
int r;
|
||||
|
||||
/*
|
||||
* Each prompt must consume one line of input. recvclient()
|
||||
* doesn't do that while player->aborted.
|
||||
*/
|
||||
CANT_HAPPEN(player->aborted);
|
||||
|
||||
pr_id(player, C_FLUSH, "%s\n", prompt);
|
||||
if ((r = recvclient(buf, size)) < 0)
|
||||
return r;
|
||||
|
@ -384,6 +390,9 @@ uprmptrd(char *prompt, char *buf, int size)
|
|||
{
|
||||
int r;
|
||||
|
||||
/* See prmptrd() */
|
||||
CANT_HAPPEN(player->aborted);
|
||||
|
||||
pr_id(player, C_FLUSH, "%s\n", prompt);
|
||||
if ((r = recvclient(buf, size)) < 0)
|
||||
return r;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue