From 546fcc6195a831fd584494f143fa6e7ddcb923a7 Mon Sep 17 00:00:00 2001 From: Chris Apers Date: Sat, 16 Jun 2007 20:30:32 +0000 Subject: Fixed invalid read from odd address in some cases (Gob1 EGA on PalmOS) svn-id: r27487 --- engines/gob/scenery.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/gob/scenery.cpp b/engines/gob/scenery.cpp index 17f3af646a..ae04c220d3 100644 --- a/engines/gob/scenery.cpp +++ b/engines/gob/scenery.cpp @@ -666,10 +666,10 @@ void Scenery::updateAnim(int16 layer, int16 frame, int16 animation, int16 flags, pictIndex = (pictIndex & 15) - 1; - left = FROM_LE_16(pictPtr[pictIndex][pieceIndex].left); - right = FROM_LE_16(pictPtr[pictIndex][pieceIndex].right); - top = FROM_LE_16(pictPtr[pictIndex][pieceIndex].top); - bottom = FROM_LE_16(pictPtr[pictIndex][pieceIndex].bottom); + left = READ_LE_UINT16(&pictPtr[pictIndex][pieceIndex].left); + right = READ_LE_UINT16(&pictPtr[pictIndex][pieceIndex].right); + top = READ_LE_UINT16(&pictPtr[pictIndex][pieceIndex].top); + bottom = READ_LE_UINT16(&pictPtr[pictIndex][pieceIndex].bottom); if (flags & 2) { if (destX < _vm->_mult->_animLeft) { -- cgit v1.2.3