From a20e2a8b504ce5c2dcf166504d0a3665bfa2e721 Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Sun, 24 Jul 2022 22:58:01 +0300 Subject: [PATCH] Fix unsigned checks --- src/interpreter_extra.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interpreter_extra.cc b/src/interpreter_extra.cc index 20d1fb9..a536b0e 100644 --- a/src/interpreter_extra.cc +++ b/src/interpreter_extra.cc @@ -1542,7 +1542,7 @@ static void opTileDistanceBetweenObjects(Program* program) int distance = 9999; if (object1 != NULL && object2 != NULL) { - if ((intptr_t)object2 >= HEX_GRID_SIZE && (intptr_t)object1 >= HEX_GRID_SIZE) { + if ((uintptr_t)object2 >= HEX_GRID_SIZE && (uintptr_t)object1 >= HEX_GRID_SIZE) { if (object1->elevation == object2->elevation) { if (object1->tile != -1 && object2->tile != -1) { distance = tileDistanceBetween(object1->tile, object2->tile);