From c5a48549459bf1302c2e6259a79b05ec195c045d Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Sat, 2 Apr 2005 17:29:53 +0000 Subject: forgot casts svn-id: r17339 --- scumm/script_v90he.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index c1f236b8fb..55729f016a 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -1992,26 +1992,26 @@ static int compareByteArrayReverse(const void *a, const void *b) { } static int compareIntArray(const void *a, const void *b) { - int va = READ_LE_UINT16((const uint8 *)a + sortArrayOffset * 2); - int vb = READ_LE_UINT16((const uint8 *)b + sortArrayOffset * 2); + int va = (int16)READ_LE_UINT16((const uint8 *)a + sortArrayOffset * 2); + int vb = (int16)READ_LE_UINT16((const uint8 *)b + sortArrayOffset * 2); return va - vb; } static int compareIntArrayReverse(const void *a, const void *b) { - int va = READ_LE_UINT16((const uint8 *)a + sortArrayOffset * 2); - int vb = READ_LE_UINT16((const uint8 *)b + sortArrayOffset * 2); + int va = (int16)READ_LE_UINT16((const uint8 *)a + sortArrayOffset * 2); + int vb = (int16)READ_LE_UINT16((const uint8 *)b + sortArrayOffset * 2); return vb - va; } static int compareDwordArray(const void *a, const void *b) { - int va = READ_LE_UINT32((const uint8 *)a + sortArrayOffset * 4); - int vb = READ_LE_UINT32((const uint8 *)b + sortArrayOffset * 4); + int va = (int32)READ_LE_UINT32((const uint8 *)a + sortArrayOffset * 4); + int vb = (int32)READ_LE_UINT32((const uint8 *)b + sortArrayOffset * 4); return va - vb; } static int compareDwordArrayReverse(const void *a, const void *b) { - int va = READ_LE_UINT32((const uint8 *)a + sortArrayOffset * 4); - int vb = READ_LE_UINT32((const uint8 *)b + sortArrayOffset * 4); + int va = (int32)READ_LE_UINT32((const uint8 *)a + sortArrayOffset * 4); + int vb = (int32)READ_LE_UINT32((const uint8 *)b + sortArrayOffset * 4); return vb - va; } -- cgit v1.2.3