Fix unsigned checks
This commit is contained in:
parent
032969ce5b
commit
a20e2a8b50
|
@ -1542,7 +1542,7 @@ static void opTileDistanceBetweenObjects(Program* program)
|
||||||
|
|
||||||
int distance = 9999;
|
int distance = 9999;
|
||||||
if (object1 != NULL && object2 != NULL) {
|
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->elevation == object2->elevation) {
|
||||||
if (object1->tile != -1 && object2->tile != -1) {
|
if (object1->tile != -1 && object2->tile != -1) {
|
||||||
distance = tileDistanceBetween(object1->tile, object2->tile);
|
distance = tileDistanceBetween(object1->tile, object2->tile);
|
||||||
|
|
Loading…
Reference in New Issue