X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/ac9f41c4c8ccbf9364a5d351e4cb134812a9926b..3c9562a2f71995e2a6f6d6fee0bcead2bebfdebc:/blackbox.c diff --git a/blackbox.c b/blackbox.c index 835175d..dbb4999 100644 --- a/blackbox.c +++ b/blackbox.c @@ -813,7 +813,9 @@ static int check_guesses(game_state *state, int cagey) ret = 0; } } - if (ret == 0) goto done; + if (ret == 0 || + state->nguesses < state->minballs || + state->nguesses > state->maxballs) goto done; /* fix up original state so the 'correct' balls end up matching the guesses, * as we've just proved that they were equivalent. */ @@ -1396,7 +1398,7 @@ static void game_print(drawing *dr, game_state *state, int tilesize) #endif const struct game thegame = { - "Black Box", "games.blackbox", + "Black Box", "games.blackbox", "blackbox", default_params, game_fetch_preset, decode_params,