summaryrefslogtreecommitdiff
path: root/src/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/data.c')
-rwxr-xr-xsrc/data.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/data.c b/src/data.c
index af43fd0..2631d3a 100755
--- a/src/data.c
+++ b/src/data.c
@@ -57,8 +57,8 @@ DistanceBetweenSquares(COOR a, COOR b)
ASSERT(IS_ON_BOARD(b));
ASSERT((i >= 0) && (i < 256));
ASSERT(g_uDistance[i] == REAL_DISTANCE(a, b));
- ASSERT(g_pDistance[a - b] == g_uDistance[i]);
- ASSERT(g_pDistance[b - a] == g_uDistance[i]);
+ ASSERT(g_pDistance[(int)a - (int)b] == g_uDistance[i]);
+ ASSERT(g_pDistance[(int)b - (int)a] == g_uDistance[i]);
ASSERT(g_uDistance[j] == REAL_DISTANCE(a, b));
return(REAL_DISTANCE(a, b));
}
@@ -586,12 +586,12 @@ InitializeDistanceTable(void)
if (!IS_ON_BOARD(y)) continue;
i = (int)x - (int)y + 128;
ASSERT(g_uDistance[i] == REAL_DISTANCE(x, y));
- ASSERT(g_pDistance[x - y] == g_uDistance[i]);
- ASSERT(&(g_pDistance[x - y]) == &(g_uDistance[i]));
+ ASSERT(g_pDistance[(int)x - (int)y] == g_uDistance[i]);
+ ASSERT(&(g_pDistance[(int)x - (int)y]) == &(g_uDistance[i]));
j = (int)y - (int)x + 128;
ASSERT(g_uDistance[j] == REAL_DISTANCE(x, y));
- ASSERT(g_pDistance[y - x] == g_uDistance[j]);
- ASSERT(&(g_pDistance[y - x]) == &(g_uDistance[j]));
+ ASSERT(g_pDistance[(int)y - (int)x] == g_uDistance[j]);
+ ASSERT(&(g_pDistance[(int)y - (int)x]) == &(g_uDistance[j]));
}
}
#endif