chiark
/
gitweb
/
~ian
/
sgt-puzzles.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d96375
)
Another fix from Chris: Guess's allow-blanks mode wasn't allowing
author
Simon Tatham
<anakin@pobox.com>
Mon, 18 Jul 2005 19:07:36 +0000
(19:07 +0000)
committer
Simon Tatham
<anakin@pobox.com>
Mon, 18 Jul 2005 19:07:36 +0000
(19:07 +0000)
blanks...
[originally from svn r6118]
guess.c
patch
|
blob
|
history
diff --git
a/guess.c
b/guess.c
index e9b0ca07c6e2e3957b4f264c9888c9dd35084187..0984d249fadf2e956a34b9f284b78b7a4e1d5794 100644
(file)
--- 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;
}