From 8586183cb0df975491d0c9aba1fb084c39f4f0f4 Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 31 May 2005 17:46:22 +0000 Subject: [PATCH] valgrind spotted this array underrun. I wonder if this might have been causing some of Verity's nonreproducible weirdnesses. git-svn-id: svn://svn.tartarus.org/sgt/puzzles@5884 cda61777-01e9-0310-a592-d414129be87e --- mines.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mines.c b/mines.c index 5023faa..a6562f6 100644 --- a/mines.c +++ b/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]); -- 2.11.0