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.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6709
cda61777-01e9-0310-a592-
d414129be87e
break;
case DLINE_DL:
case DLINE_DR:
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;
}
LV_BELOW_DOT(state, i, j) = line_new;
retval = TRUE;
}
case DLINE_UR:
case DLINE_DR:
case DLINE_HORIZ:
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:
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;
}
LV_BELOW_DOT(state, i, j) = line_new;
retval = TRUE;
}