Fix interrupted-magic-words cosmetic bug.

C patch by Torbjörn Andersson.
This commit is contained in:
Eric S. Raymond 2023-03-10 16:43:27 -05:00
parent 3971a61ab0
commit b125fe7b2a
5 changed files with 19 additions and 8 deletions

6
main.c
View file

@ -1125,6 +1125,12 @@ static bool do_command()
if (!get_command_input(&command))
return false;
/* Every input, check "foobar" flag. If zero, nothing's going
* on. If pos, make neg. If neg, he skipped a word, so make it
* zero.
*/
game.foobar = (game.foobar > WORD_EMPTY) ? -game.foobar : WORD_EMPTY;
++game.turns;
preprocess_command(&command);
}