Relax the savefile validity check a little.
[open-adventure.git] / main.c
diff --git a/main.c b/main.c
index 94f2b45b9fe30d5c2251e9d9b431cee7af9c028e..7a6c6c868542fc55cbf0960bd02ce52f1bc1a161 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1074,7 +1074,7 @@ static bool do_move(void)
     return true;
 }
 
-static bool do_command()
+static bool do_command(void)
 /* Get and execute a command */
 {
     static command_t command;
@@ -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);
             }