[Scummvm-cvs-logs] SF.net SVN: scummvm:[34689] scummvm/trunk/engines/scumm/smush/smush_player. cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Mon Sep 29 22:41:07 CEST 2008


Revision: 34689
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34689&view=rev
Author:   eriktorbjorn
Date:     2008-09-29 20:40:58 +0000 (Mon, 29 Sep 2008)

Log Message:
-----------
Since no one has come up with any better suggestion... this should fix #2123258
("COMI: Crash after video (SAN) play"). The eos() function won't return true
until we've tried to read *past* the end of the stream.

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/smush/smush_player.cpp

Modified: scummvm/trunk/engines/scumm/smush/smush_player.cpp
===================================================================
--- scummvm/trunk/engines/scumm/smush/smush_player.cpp	2008-09-29 20:08:26 UTC (rev 34688)
+++ scummvm/trunk/engines/scumm/smush/smush_player.cpp	2008-09-29 20:40:58 UTC (rev 34689)
@@ -1017,16 +1017,17 @@
 	}
 
 	assert(_base);
+
+	const uint32 subType = _base->readUint32BE();
+	const int32 subSize = _base->readUint32BE();
+	const int32 subOffset = _base->pos();
+
 	if (_base->eos()) {
 		_vm->_smushVideoShouldFinish = true;
 		_endOfFile = true;
 		return;
 	}
 
-	const uint32 subType = _base->readUint32BE();
-	const int32 subSize = _base->readUint32BE();
-	const int32 subOffset = _base->pos();
-
 	switch (subType) {
 	case MKID_BE('AHDR'): // FT INSANE may seek file to the beginning
 		handleAnimHeader(subSize, *_base);


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