diff options
-rw-r--r-- | gob/draw.cpp | 4 | ||||
-rw-r--r-- | gob/game.cpp | 2 | ||||
-rw-r--r-- | gob/inter.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/gob/draw.cpp b/gob/draw.cpp index 7cdaa30e86..f53862722b 100644 --- a/gob/draw.cpp +++ b/gob/draw.cpp @@ -404,9 +404,9 @@ void draw_spriteOperation(int16 operation) { szGame_TotResTable + szGame_TotResItem * game_totResourceTable->itemsCount + offset; } else { - dataBuf = + dataBuf = game_imFileData + - ((int32 *)game_imFileData)[-offset - 1]; + (int32)READ_LE_UINT32(&((int32 *)game_imFileData)[-offset - 1]); } draw_spriteRight = itemPtr->width; diff --git a/gob/game.cpp b/gob/game.cpp index 066889a1dc..76c9fcd75b 100644 --- a/gob/game.cpp +++ b/gob/game.cpp @@ -377,7 +377,7 @@ char *game_loadTotResource(int16 id) { return ((char *)game_totResourceTable) + szGame_TotResTable + szGame_TotResItem * game_totResourceTable->itemsCount + offset; } else { - return (char *)(game_imFileData + ((int32 *)game_imFileData)[-offset - 1]); + return (char *)(game_imFileData + (int32)READ_LE_UINT32(&((int32 *)game_imFileData)[-offset - 1])); } } diff --git a/gob/inter.cpp b/gob/inter.cpp index cdc41a86b1..d191584c92 100644 --- a/gob/inter.cpp +++ b/gob/inter.cpp @@ -818,7 +818,7 @@ void inter_loadCursor(void) { ((char *)game_totResourceTable) + szGame_TotResTable + szGame_TotResItem * game_totResourceTable->itemsCount + offset; } else { - dataBuf = game_imFileData + ((int32 *)game_imFileData)[-offset - 1]; + dataBuf = game_imFileData + (int32)READ_LE_UINT32(&((int32 *)game_imFileData)[-offset - 1]); } width = itemPtr->width; |