chiark / gitweb /
Add a missing error message in Flood solve_game().
[sgt-puzzles.git] / flood.c
diff --git a/flood.c b/flood.c
index bbba91528bdee8f82e9993f122fa80deb7a72bf7..f97de2fa7cf5b7885eb59ec2a128c0e561da7153 100644 (file)
--- a/flood.c
+++ b/flood.c
@@ -697,8 +697,10 @@ static char *solve_game(const game_state *state, const game_state *currstate,
     char buf[256];
     struct solver_scratch *scratch;
 
-    if (currstate->complete)
+    if (currstate->complete) {
+        *error = "Puzzle is already solved";
         return NULL;
+    }
 
     /*
      * Find the best solution our solver can give.