Typo affecting gameplay on grids wider than they are tall. (Clicking
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Wed, 24 Feb 2010 18:06:59 +0000 (18:06 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Wed, 24 Feb 2010 18:06:59 +0000 (18:06 +0000)
in columns with x > h was being erroneously rejected.)

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

blackbox.c

index 7d5a77d..14973f4 100644 (file)
@@ -372,7 +372,7 @@ static int grid2range(game_state *state, int x, int y, int *rangeno)
     int ret, x1 = state->w+1, y1 = state->h+1;
 
     if (x > 0 && x < x1 && y > 0 && y < y1) return 0; /* in arena */
-    if (x < 0 || x > y1 || y < 0 || y > y1) return 0; /* outside grid */
+    if (x < 0 || x > x1 || y < 0 || y > y1) return 0; /* outside grid */
 
     if ((x == 0 || x == x1) && (y == 0 || y == y1))
         return 0; /* one of 4 corners */