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:
50b6e0d
)
Dylan O'Donnell reports that Signpost hangs on trying to generate a
author
Simon Tatham
<anakin@pobox.com>
Fri, 2 Apr 2010 07:21:34 +0000
(07:21 +0000)
committer
Simon Tatham
<anakin@pobox.com>
Fri, 2 Apr 2010 07:21:34 +0000
(07:21 +0000)
2x2 puzzle. Rule it out in validate_params().
[originally from svn r8913]
signpost.c
patch
|
blob
|
history
diff --git
a/signpost.c
b/signpost.c
index 05d4eafb4cf0124cd7a5100d5a04b58c662ff6c9..d4812a2777bf6da206b1316e182e17935529933c 100644
(file)
--- a/
signpost.c
+++ b/
signpost.c
@@
-423,6
+423,8
@@
static char *validate_params(game_params *params, int full)
{
if (params->w < 2 || params->h < 2)
return "Width and height must both be at least two";
+ if (params->w == 2 && params->h == 2) /* leads to generation hang */
+ return "Width and height cannot both be two";
return NULL;
}