From 2327c580e6c768ce9f9bfacecd9593cf7ed0359c Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 27 Dec 2009 19:18:22 +0000 Subject: [PATCH] Fix bug causing array overrun. Only seemed to be showing a symptom on Windows, presumably because the data after the array was harmless elsewhere. git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8798 cda61777-01e9-0310-a592-d414129be87e --- unequal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unequal.c b/unequal.c index 459e35f..8c56509 100644 --- a/unequal.c +++ b/unequal.c @@ -728,7 +728,7 @@ static int solver_adjacent_set(struct latin_solver *solver, void *vctx) for (x = 0; x < o; x++) { for (y = 0; y < o; y++) { - for (i = 0; i < o; i++) { + for (i = 0; i < 4; i++) { int isadjacent = (GRID(ctx->state, flags, x, y) & adjthan[i].f); nx = x + adjthan[i].dx, ny = y + adjthan[i].dy; -- 2.11.0