diff options
| author | Simon Tatham <anakin@pobox.com> | 2006-02-07 21:45:50 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2006-02-07 21:45:50 +0000 |
| commit | c5001ca751641b341b90913ba67c9138923ab759 (patch) | |
| tree | 530896788fcd401e50c72ab21c4cc5e074c66bc4 /blackbox.c | |
| parent | acafc4d93f81d06069dcdda7a99666bcc04e7850 (diff) | |
| download | puzzles-c5001ca751641b341b90913ba67c9138923ab759.zip puzzles-c5001ca751641b341b90913ba67c9138923ab759.tar.gz puzzles-c5001ca751641b341b90913ba67c9138923ab759.tar.bz2 puzzles-c5001ca751641b341b90913ba67c9138923ab759.tar.xz | |
Tal Kelrich spotted that hitting `Solve' on a configuration which is
laser-indistinguishable from the right solution _but_ has a number
of balls outside the acceptable range does not report an error. His
example was the game ID w8h8m5M5:1e3e6e80fa3e16265ccef7ca , omitting
the rightmost ball in the second row.
[originally from svn r6542]
Diffstat (limited to 'blackbox.c')
| -rw-r--r-- | blackbox.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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. */ |