]> git.pond.sub.org Git - empserver/blobdiff - src/lib/common/bestpath.c
Update copyright notice
[empserver] / src / lib / common / bestpath.c
index 5df5601ca3e399bd2c2a4f2ba5d81a8e07045fd3..5003082aa589ae1a45f6df290742022f47fda804 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
 
 #include <config.h>
 
-#include "misc.h"
-#include "xy.h"
-#include "sect.h"
 #include "file.h"
+#include "misc.h"
 #include "nat.h"
-#include "path.h"
-#include "common.h"
 #include "optlist.h"
+#include "path.h"
+#include "prototypes.h"
+#include "sect.h"
+#include "xy.h"
 
 static int owned_and_navigable(char *, int, int, int);
 
@@ -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);