[Scummvm-cvs-logs] SF.net SVN: scummvm: [28788] scummvm/trunk/engines/saga/animation.cpp

sev at users.sourceforge.net sev at users.sourceforge.net
Sat Sep 1 17:03:44 CEST 2007


Revision: 28788
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28788&view=rev
Author:   sev
Date:     2007-09-01 08:03:44 -0700 (Sat, 01 Sep 2007)

Log Message:
-----------
Do not decode frames beyond maxFrames to avoid any potential issues

Modified Paths:
--------------
    scummvm/trunk/engines/saga/animation.cpp

Modified: scummvm/trunk/engines/saga/animation.cpp
===================================================================
--- scummvm/trunk/engines/saga/animation.cpp	2007-09-01 14:58:46 UTC (rev 28787)
+++ scummvm/trunk/engines/saga/animation.cpp	2007-09-01 15:03:44 UTC (rev 28788)
@@ -829,8 +829,12 @@
 	readS._bigEndian = !_vm->isBigEndian(); // RLE has inversion BE<>LE
 
 	while (!readS.eos()) {
-		if (reallyFill && currentFrame <= anim->maxFrame)
+		if (reallyFill) {
 			anim->frameOffsets[currentFrame] = readS.pos();
+
+			if (currentFrame == anim->maxFrame)
+				break;
+		}
 		currentFrame++;
 
 		// For some strange reason, the animation header is in little


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