mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
Another fix from Chris: Guess's allow-blanks mode wasn't allowing
blanks... [originally from svn r6118]
This commit is contained in:
3
guess.c
3
guess.c
@ -768,7 +768,8 @@ static game_state *execute_move(game_state *from, char *move)
|
|||||||
|
|
||||||
for (i = 0; i < from->solution->npegs; i++) {
|
for (i = 0; i < from->solution->npegs; i++) {
|
||||||
int val = atoi(p);
|
int val = atoi(p);
|
||||||
if (val <= 0 || val > from->params.ncolours) {
|
int min_colour = from->params.allow_blank? 0 : 1;
|
||||||
|
if (val < min_colour || val > from->params.ncolours) {
|
||||||
free_game(ret);
|
free_game(ret);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user