ref: d295a8a93c88bbd65ecfa57f4b70c9c4c6286e97
parent: f1af73319ffceb1b936669182f540454eeb67541
author: Simon Tatham <anakin@pobox.com>
date: Thu Dec 24 17:05:48 EST 2015
Add a missing error message in Flood solve_game(). The only situation in which it actually can't find a solution is if the puzzle is already solved, in which case it can at least fill in *error to say so before it returns NULL.
--- a/flood.c
+++ b/flood.c
@@ -697,8 +697,10 @@
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.