From: Simon Tatham Date: Fri, 2 Apr 2010 07:21:34 +0000 (+0000) Subject: Dylan O'Donnell reports that Signpost hangs on trying to generate a X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=8e74bbae6b12fbf0afe155b9ba3b8329426583d4;p=sgt-puzzles.git Dylan O'Donnell reports that Signpost hangs on trying to generate a 2x2 puzzle. Rule it out in validate_params(). [originally from svn r8913] --- 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; }