c = 10 + (c - 'A');
else
return "Bad character in grid description";
- if (c < 0 || c >= params->colours)
+ if ((unsigned)c >= params->colours)
return "Colour out of range in grid description";
}
if (*desc != ',')
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.
const struct game thegame = {
"Flood", "games.flood", "flood",
default_params,
- game_fetch_preset,
+ game_fetch_preset, NULL,
decode_params,
encode_params,
free_params,