From a69e2248fbf2ae5506ee0767729230b9f5f7222f Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 18 Jul 2005 19:07:36 +0000 Subject: [PATCH] Another fix from Chris: Guess's allow-blanks mode wasn't allowing blanks... git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6118 cda61777-01e9-0310-a592-d414129be87e --- guess.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guess.c b/guess.c index e9b0ca0..0984d24 100644 --- a/guess.c +++ b/guess.c @@ -768,7 +768,8 @@ static game_state *execute_move(game_state *from, char *move) for (i = 0; i < from->solution->npegs; i++) { 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); return NULL; } -- 2.11.0