[Scummvm-cvs-logs] SF.net SVN: scummvm:[43476] scummvm/branches/branch-1-0-0/engines/kyra/ screen.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Mon Aug 17 14:52:14 CEST 2009


Revision: 43476
          http://scummvm.svn.sourceforge.net/scummvm/?rev=43476&view=rev
Author:   lordhoto
Date:     2009-08-17 12:52:14 +0000 (Mon, 17 Aug 2009)

Log Message:
-----------
Backport of r43475: "Fix possible out of bounds access in Screen::drawShape."

Modified Paths:
--------------
    scummvm/branches/branch-1-0-0/engines/kyra/screen.cpp

Modified: scummvm/branches/branch-1-0-0/engines/kyra/screen.cpp
===================================================================
--- scummvm/branches/branch-1-0-0/engines/kyra/screen.cpp	2009-08-17 12:47:57 UTC (rev 43475)
+++ scummvm/branches/branch-1-0-0/engines/kyra/screen.cpp	2009-08-17 12:52:14 UTC (rev 43476)
@@ -1234,8 +1234,7 @@
 	}
 
 	if (flags & 0x200) {
-		++_drawShapeVar1;
-		_drawShapeVar1 &= (_vm->gameFlags().gameID == GI_KYRA1) ? 0x7 : 0xF;
+		_drawShapeVar1 = (_drawShapeVar1 + 1) & 0x7;
 		_drawShapeVar3 = drawShapeVar2[_drawShapeVar1];
 		_drawShapeVar4 = 0;
 		_drawShapeVar5 = 256;


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