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:
Simon Tatham
2005-05-31 17:46:22 +00:00
parent 274423eaf8
commit c11f9ff173

View File

@ -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]);