mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
valgrind spotted this array underrun. I wonder if this might have
been causing some of Verity's nonreproducible weirdnesses. [originally from svn r5884]
This commit is contained in:
2
mines.c
2
mines.c
@ -1086,7 +1086,7 @@ static int minesolve(int w, int h, int n, signed char *grid,
|
||||
* next. Backtrack cursor to the nearest 1,
|
||||
* change it to a 0 and continue.
|
||||
*/
|
||||
while (cursor-- >= 0 && !setused[cursor]);
|
||||
while (--cursor >= 0 && !setused[cursor]);
|
||||
if (cursor >= 0) {
|
||||
assert(setused[cursor]);
|
||||
|
||||
|
Reference in New Issue
Block a user