Fix unsigned checks

This commit is contained in:
Alexander Batalov 2022-07-24 22:58:01 +03:00
parent 032969ce5b
commit a20e2a8b50
1 changed files with 1 additions and 1 deletions

View File

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