From 674e305bf1d092a510022c736d6b7857a3577fc2 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Mon, 10 May 2010 23:55:13 +0200 Subject: digital/avr/modules/path/astar: fix integer overflow on avr --- digital/avr/modules/path/astar/astar.c | 1 + 1 file changed, 1 insertion(+) (limited to 'digital/avr/modules/path/astar/astar.c') diff --git a/digital/avr/modules/path/astar/astar.c b/digital/avr/modules/path/astar/astar.c index a5d4bd48..4b2c816e 100644 --- a/digital/avr/modules/path/astar/astar.c +++ b/digital/avr/modules/path/astar/astar.c @@ -70,6 +70,7 @@ astar (struct astar_node_t *nodes, uint8_t nodes_nb, uint8_t initial, /* OK, there is some work, move this node to the closed set, it will * never be consider again. */ nodes[lowest_node].score = ASTAR_NODE_SCORE_CLOSED; + nodes[lowest_node].heuristic = 0; /* Now, process all its neighbors. */ struct astar_neighbor_t neighbors[nodes_nb - 1]; uint8_t neighbors_nb = AC_ASTAR_NEIGHBOR_CALLBACK (lowest_node, -- cgit v1.2.3