Fix interrupted-magic-words cosmetic bug.
[open-adventure.git] / main.c
diff --git a/main.c b/main.c
index 94f2b45b9fe30d5c2251e9d9b431cee7af9c028e..371b3b67d7a1af9ae14e018f1d372f00927e7d2f 100644 (file)
--- a/main.c
+++ b/main.c
@@ -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);
             }