Dylan O'Donnell reports that Signpost hangs on trying to generate a
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 2 Apr 2010 07:21:34 +0000 (07:21 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 2 Apr 2010 07:21:34 +0000 (07:21 +0000)
2x2 puzzle. Rule it out in validate_params().

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8913 cda61777-01e9-0310-a592-d414129be87e

signpost.c

index 05d4eaf..d4812a2 100644 (file)
@@ -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;
 }