So that a blank line wouldn't use up one of the player's "tries" for
class genocide, the game would continue to prompt until the input was
non-blank (or the user hit <esc>), with a tight loop around the getlin
call that only exited when it got some non-empty input. This apparently
risked leaving the game endlessly looping under some worst-case-scenario
hangup conditions. It was also inconsistent with normal genocide, which
doesn't have special handling of blank lines. Make the class genocide
prompt behave like the normal genocide prompt by removing the "blank
input" loop (and consequently treating a blank line the same way as any
other attempt to write a name).
pline1(thats_enough_tries);
return;
}
- do {
- getlin("What class of monsters do you wish to genocide?", buf);
- (void) mungspaces(buf);
- } while (!*buf);
+ getlin("What class of monsters do you wish to genocide?", buf);
+ (void) mungspaces(buf);
/* choosing "none" preserves genocideless conduct */
if (*buf == '\033' || !strcmpi(buf, "none")
|| !strcmpi(buf, "nothing")) {