[Scummvm-cvs-logs] SF.net SVN: scummvm:[53973] scummvm/trunk/engines/kyra

athrxx at users.sourceforge.net athrxx at users.sourceforge.net
Sun Oct 31 02:20:31 CEST 2010


Revision: 53973
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53973&view=rev
Author:   athrxx
Date:     2010-10-31 00:20:30 +0000 (Sun, 31 Oct 2010)

Log Message:
-----------
LOL: fixed bug #3099321

(Crash in Yvel tavern basement)

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/screen_v2.cpp
    scummvm/trunk/engines/kyra/sprites_lol.cpp

Modified: scummvm/trunk/engines/kyra/screen_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen_v2.cpp	2010-10-31 00:14:59 UTC (rev 53972)
+++ scummvm/trunk/engines/kyra/screen_v2.cpp	2010-10-31 00:20:30 UTC (rev 53973)
@@ -187,16 +187,22 @@
 }
 
 int Screen_v2::getShapeScaledWidth(const uint8 *shpFile, int scale) {
+	if (!shpFile)
+		return 0;
 	int width = READ_LE_UINT16(shpFile+3);
 	return (width * scale) >> 8;
 }
 
 int Screen_v2::getShapeScaledHeight(const uint8 *shpFile, int scale) {
+	if (!shpFile)
+		return 0;
 	int height = shpFile[2];
 	return (height * scale) >> 8;
 }
 
 uint16 Screen_v2::getShapeSize(const uint8 *shp) {
+	if (!shp)
+		return 0;
 	return READ_LE_UINT16(shp+6);
 }
 

Modified: scummvm/trunk/engines/kyra/sprites_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sprites_lol.cpp	2010-10-31 00:14:59 UTC (rev 53972)
+++ scummvm/trunk/engines/kyra/sprites_lol.cpp	2010-10-31 00:20:30 UTC (rev 53973)
@@ -901,6 +901,9 @@
 }
 
 void LoLEngine::drawDoor(uint8 *shape, uint8 *doorPalette, int index, int unk2, int w, int h, int flags) {
+	if (!shape)
+		return;
+
 	uint8 c = _dscDoor1[(_currentDirection << 5) + unk2];
 	int r = (c / 5) + 5 * _dscDimMap[index];
 	uint16 d = _dscShapeOvlIndex[r];


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list