shithub: puzzles

Download patch

ref: 910aa99e6eb72309a855c3d9d3b1ed600dcec3d9
parent: 6d96375736a2991d61df292ae38adcc010b860bf
author: Simon Tatham <anakin@pobox.com>
date: Mon Jul 18 15:07:36 EDT 2005

Another fix from Chris: Guess's allow-blanks mode wasn't allowing
blanks...

[originally from svn r6118]

--- a/guess.c
+++ b/guess.c
@@ -768,7 +768,8 @@
 
 	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;
 	    }