aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2006-05-20 11:54:21 +0000
committerSimon Tatham <anakin@pobox.com>2006-05-20 11:54:21 +0000
commit197e262ba643a7c0af7f157ae175445109b7d132 (patch)
tree6ad4b08725d53af1935bdc3a0473bfc66499044a
parent877900f58af023be317ee79b7ed29f13b1e9f18e (diff)
downloadpuzzles-197e262ba643a7c0af7f157ae175445109b7d132.zip
puzzles-197e262ba643a7c0af7f157ae175445109b7d132.tar.gz
puzzles-197e262ba643a7c0af7f157ae175445109b7d132.tar.bz2
puzzles-197e262ba643a7c0af7f157ae175445109b7d132.tar.xz
Cleanup patch from Ben Hutchings, fixing some odd-looking range
checks. He thinks they were harmless (due to being followed by other range checks in RIGHTOF_DOT and friends) but it clearly can't hurt to fix them anyway. [originally from svn r6709]
-rw-r--r--loopy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/loopy.c b/loopy.c
index 69ddb56..ce49c73 100644
--- a/loopy.c
+++ b/loopy.c
@@ -1283,7 +1283,7 @@ static int dot_setall_dlines(solver_state *sstate, enum dline dl, int i, int j,
break;
case DLINE_DL:
case DLINE_DR:
- if (j <= (state)->h && BELOW_DOT(state, i, j) == line_old) {
+ if (j < (state)->h && BELOW_DOT(state, i, j) == line_old) {
LV_BELOW_DOT(state, i, j) = line_new;
retval = TRUE;
}
@@ -1308,13 +1308,13 @@ static int dot_setall_dlines(solver_state *sstate, enum dline dl, int i, int j,
case DLINE_UR:
case DLINE_DR:
case DLINE_HORIZ:
- if (i <= (state)->w && RIGHTOF_DOT(state, i, j) == line_old) {
+ if (i < (state)->w && RIGHTOF_DOT(state, i, j) == line_old) {
LV_RIGHTOF_DOT(state, i, j) = line_new;
retval = TRUE;
}
break;
case DLINE_VERT:
- if (j <= (state)->h && BELOW_DOT(state, i, j) == line_old) {
+ if (j < (state)->h && BELOW_DOT(state, i, j) == line_old) {
LV_BELOW_DOT(state, i, j) = line_new;
retval = TRUE;
}