chiark / gitweb /
Typo affecting gameplay on grids wider than they are tall. (Clicking
authorSimon Tatham <anakin@pobox.com>
Wed, 24 Feb 2010 18:06:59 +0000 (18:06 +0000)
committerSimon Tatham <anakin@pobox.com>
Wed, 24 Feb 2010 18:06:59 +0000 (18:06 +0000)
in columns with x > h was being erroneously rejected.)

[originally from svn r8886]

blackbox.c

index 7d5a77d0b3e66af6594cde090876fa370f26d14d..14973f4402fd6cbb2040b3539dd0876db3dbd002 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 */