From 9391b0c6b71e2c1f44e75ac153b3abad152f6195 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Mon, 7 Jul 2014 17:06:36 +0200
Subject: [PATCH] Server: Fix bug of ai module's dijkstra_map() hanging on too
 large maps.

---
 src/server/ai.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/server/ai.c b/src/server/ai.c
index ff883dd..bc78e06 100644
--- a/src/server/ai.c
+++ b/src/server/ai.c
@@ -88,7 +88,8 @@ static void get_neighbor_scores(uint16_t * score_map, uint16_t pos_i,
 static void dijkstra_map(uint16_t * score_map, uint16_t max_score)
 {
     uint32_t map_size = world.map.length * world.map.length;
-    uint16_t pos, i_scans, neighbors[N_DIRS], min_neighbor;
+    uint32_t pos;
+    uint16_t i_scans, neighbors[N_DIRS], min_neighbor;
     uint8_t scores_still_changing = 1;
     uint8_t i_dirs;
     for (i_scans = 0; scores_still_changing; i_scans++)
-- 
2.30.2