From 7bddbe98a4f6938035dafeab2244ff1e1816487f Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 11 Jul 2006 06:25:26 +0000 Subject: [PATCH] (bestownedpath): Failed to consider direction y due to off-by one mistake in rev. 1.28. Reported by Stefan Hauser. --- src/lib/common/bestpath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/common/bestpath.c b/src/lib/common/bestpath.c index 97c8b15ff..055589151 100644 --- a/src/lib/common/bestpath.c +++ b/src/lib/common/bestpath.c @@ -142,7 +142,7 @@ bestownedpath(char *bpath, char *bigmap, if (!valid(x, y)) continue; if (((mapindex[x][y] & 0x1FFF) == routelen - 1)) { - for (i = DIR_FIRST; i < DIR_LAST; i++) { + for (i = DIR_FIRST; i <= DIR_LAST; i++) { tx = x + diroff[i][0]; ty = y + diroff[i][1]; tx = XNORM(tx); -- 2.43.0