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.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'digital/avr/modules/path/astar/astar.h') diff --git a/digital/avr/modules/path/astar/astar.h b/digital/avr/modules/path/astar/astar.h index 5122b6c3..ee82b2cc 100644 --- a/digital/avr/modules/path/astar/astar.h +++ b/digital/avr/modules/path/astar/astar.h @@ -26,9 +26,9 @@ * }}} */ /** Used instead of score for a unvisited node. */ -#define ASTAR_NODE_SCORE_UNVISITED 0xffff +#define ASTAR_NODE_SCORE_UNVISITED ((uint16_t) 0xffff) /** Used instead of score for a node in the closed set. */ -#define ASTAR_NODE_SCORE_CLOSED 0xfffe +#define ASTAR_NODE_SCORE_CLOSED ((uint16_t) 0xfffe) /** Test whether a node is in the open set. */ #define ASTAR_NODE_SCORE_OPEN(score) ((score) < ASTAR_NODE_SCORE_CLOSED) -- cgit v1.2.3