[Scummvm-cvs-logs] scummvm master -> 672e981b17610d7b8403fccbb8757fae05ade3b5

joostp joostp at 7fc1.org
Thu Nov 24 22:21:21 CET 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
672e981b17 TOLTECS: Fix crash on Big Endian


Commit: 672e981b17610d7b8403fccbb8757fae05ade3b5
    https://github.com/scummvm/scummvm/commit/672e981b17610d7b8403fccbb8757fae05ade3b5
Author: Joost Peters (joostp at scummvm.org)
Date: 2011-11-24T13:18:05-08:00

Commit Message:
TOLTECS: Fix crash on Big Endian

Changed paths:
    engines/toltecs/screen.cpp



diff --git a/engines/toltecs/screen.cpp b/engines/toltecs/screen.cpp
index 4eda8f6..d66ed18 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);






More information about the Scummvm-git-logs mailing list