From: Christian Heller Date: Mon, 7 Jul 2014 15:06:36 +0000 (+0200) Subject: Server: Fix bug of ai module's dijkstra_map() hanging on too large maps. X-Git-Tag: tce~732 X-Git-Url: https://plomlompom.com/repos/te"st.html?a=commitdiff_plain;h=9391b0c6b71e2c1f44e75ac153b3abad152f6195;p=plomrogue Server: Fix bug of ai module's dijkstra_map() hanging on too large maps. --- 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++)