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 = '~';
|
army = '~';
|
||||||
for (;;) {
|
for (;;) {
|
||||||
p = getstring(prompt, buf);
|
p = getstring(prompt, buf);
|
||||||
if (player->aborted || (p && *p == 'q')) {
|
if (!p || *p == 'q') {
|
||||||
abort_attack();
|
abort_attack();
|
||||||
return 'N';
|
return 'N';
|
||||||
}
|
}
|
||||||
if (!p || !*p)
|
if (!*p)
|
||||||
return 'n';
|
return 'n';
|
||||||
if (tolower(*p) == 'y' || tolower(*p) == 'n')
|
if (tolower(*p) == 'y' || tolower(*p) == 'n')
|
||||||
return *p;
|
return *p;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue