aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2010-04-02 07:21:34 +0000
committerSimon Tatham <anakin@pobox.com>2010-04-02 07:21:34 +0000
commit8e74bbae6b12fbf0afe155b9ba3b8329426583d4 (patch)
treef1010c8899d7817576447aae43485b3157adaa61
parent50b6e0d7087b6b9b4bc64f279e0ae424f1a24f6b (diff)
downloadpuzzles-8e74bbae6b12fbf0afe155b9ba3b8329426583d4.zip
puzzles-8e74bbae6b12fbf0afe155b9ba3b8329426583d4.tar.gz
puzzles-8e74bbae6b12fbf0afe155b9ba3b8329426583d4.tar.bz2
puzzles-8e74bbae6b12fbf0afe155b9ba3b8329426583d4.tar.xz
Dylan O'Donnell reports that Signpost hangs on trying to generate a
2x2 puzzle. Rule it out in validate_params(). [originally from svn r8913]
-rw-r--r--signpost.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/signpost.c b/signpost.c
index 05d4eaf..d4812a2 100644
--- 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;
}