From 672e981b17610d7b8403fccbb8757fae05ade3b5 Mon Sep 17 00:00:00 2001 From: Joost Peters Date: Thu, 24 Nov 2011 22:18:05 +0100 Subject: TOLTECS: Fix crash on Big Endian --- engines/toltecs/screen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/toltecs') diff --git a/engines/toltecs/screen.cpp b/engines/toltecs/screen.cpp index 4eda8f643f..d66ed18d8c 100644 --- a/engines/toltecs/screen.cpp +++ b/engines/toltecs/screen.cpp @@ -213,13 +213,13 @@ void Screen::addAnimatedSprite(int16 x, int16 y, int16 fragmentId, byte *data, i drawRequest.scaling = 0; } - int16 count = spriteArray[0]; + int16 count = FROM_LE_16(spriteArray[0]); //debug(0, "count = %d", count); for (int16 index = 1; index <= count; index++) { - byte *spriteItem = data + spriteArray[index]; + byte *spriteItem = data + FROM_LE_16(spriteArray[index]); uint16 loopNum = READ_LE_UINT16(spriteItem + 0) & 0x7FFF; uint16 loopCount = READ_LE_UINT16(spriteItem + 2); -- cgit v1.2.3