(bestownedpath): Failed to consider direction y due to off-by one

mistake in rev. 1.28.  Reported by Stefan Hauser.
This commit is contained in:
Markus Armbruster 2006-07-11 06:25:26 +00:00
parent e55198f2c3
commit 7bddbe98a4

View file

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