aboutsummaryrefslogtreecommitdiff
path: root/blackbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'blackbox.c')
-rw-r--r--blackbox.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/blackbox.c b/blackbox.c
index 835175d..165ee2e 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. */