Simplify att_prompt()
This commit is contained in:
parent
0b0612ea04
commit
3c25ebd927
1 changed files with 2 additions and 2 deletions
|
@ -951,11 +951,11 @@ att_prompt(char *prompt, char army)
|
|||
army = '~';
|
||||
for (;;) {
|
||||
p = getstring(prompt, buf);
|
||||
if (player->aborted || (p && *p == 'q')) {
|
||||
if (!p || *p == 'q') {
|
||||
abort_attack();
|
||||
return 'N';
|
||||
}
|
||||
if (!p || !*p)
|
||||
if (!*p)
|
||||
return 'n';
|
||||
if (tolower(*p) == 'y' || tolower(*p) == 'n')
|
||||
return *p;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue