diff options
| author | Simon Tatham <anakin@pobox.com> | 2023-02-05 12:05:28 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2023-02-05 12:05:28 +0000 |
| commit | 9ce0a6d93212ffc0986a2b399fd8e9e983f62904 (patch) | |
| tree | a4f04fe4b8456906e647630907514b03bff43c57 /pearl.c | |
| parent | 05c536e50d0c3114e1de5283eac97ff22bad0fc7 (diff) | |
| download | puzzles-9ce0a6d93212ffc0986a2b399fd8e9e983f62904.zip puzzles-9ce0a6d93212ffc0986a2b399fd8e9e983f62904.tar.gz puzzles-9ce0a6d93212ffc0986a2b399fd8e9e983f62904.tar.bz2 puzzles-9ce0a6d93212ffc0986a2b399fd8e9e983f62904.tar.xz | |
Pearl: fix bounds check in previous commit.
Ahem. That's what I get for testing the fix on a square puzzle.
Diffstat (limited to 'pearl.c')
| -rw-r--r-- | pearl.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -873,7 +873,7 @@ cleanup: for (d = 1; d <= 8; d += d) { int nx = x + DX(d), ny = y + DY(d); int rlink; - if (0 <= nx && nx < w && 0 <= ny && ny < w) + if (0 <= nx && nx < w && 0 <= ny && ny < h) rlink = result[ny*w+nx] & F(d); else rlink = 0; /* off-board squares don't link back */ |