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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Fri May 29 13:43:22 CEST 2009


Revision: 40983
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40983&view=rev
Author:   lordhoto
Date:     2009-05-29 11:43:22 +0000 (Fri, 29 May 2009)

Log Message:
-----------
Fix valgrind warnings.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/screen.cpp

Modified: scummvm/trunk/engines/kyra/screen.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen.cpp	2009-05-29 11:07:35 UTC (rev 40982)
+++ scummvm/trunk/engines/kyra/screen.cpp	2009-05-29 11:43:22 UTC (rev 40983)
@@ -1413,7 +1413,7 @@
 
 	uint8 *d = dst;
 
-	while (shapeHeight--) {
+	while (true) {
 		bool normalPlot = true;
 		if (flags & 0x800)
 			normalPlot = (curY > _maskMinY && curY < _maskMaxY);
@@ -1447,7 +1447,9 @@
 			dst += dsPitch;
 			d = dst;
 			++curY;
-			scaleCounterV -= 256;
+			if (!--shapeHeight)
+				return;
+			scaleCounterV -= 0x100;
 		} while (scaleCounterV & 0xff00);
 	}
 


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