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);