[Scummvm-cvs-logs] SF.net SVN: scummvm:[44052] scummvm/trunk/engines/groovie/vdx.cpp
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Sun Sep 13 13:02:39 CEST 2009
Revision: 44052
http://scummvm.svn.sourceforge.net/scummvm/?rev=44052&view=rev
Author: eriktorbjorn
Date: 2009-09-13 11:02:39 +0000 (Sun, 13 Sep 2009)
Log Message:
-----------
Fixed crash when reaching the end of the movie, riggered by recent Stream
changes.
Modified Paths:
--------------
scummvm/trunk/engines/groovie/vdx.cpp
Modified: scummvm/trunk/engines/groovie/vdx.cpp
===================================================================
--- scummvm/trunk/engines/groovie/vdx.cpp 2009-09-13 11:00:47 UTC (rev 44051)
+++ scummvm/trunk/engines/groovie/vdx.cpp 2009-09-13 11:02:39 UTC (rev 44052)
@@ -123,17 +123,21 @@
bool VDXPlayer::playFrameInternal() {
byte currRes = 0x80;
Common::ReadStream *vdxData = 0;
- while (!_file->eos() && currRes == 0x80) {
+ while (currRes == 0x80) {
currRes = _file->readByte();
// Skip unknown data: 1 byte, ref Edward
byte tmp = _file->readByte();
- debugC(5, kGroovieDebugVideo | kGroovieDebugUnknown | kGroovieDebugAll, "Groovie::VDX: Edward = 0x%04X", tmp);
uint32 compSize = _file->readUint32LE();
uint8 lengthmask = _file->readByte();
uint8 lengthbits = _file->readByte();
+ if (_file->eos())
+ break;
+
+ debugC(5, kGroovieDebugVideo | kGroovieDebugUnknown | kGroovieDebugAll, "Groovie::VDX: Edward = 0x%04X", tmp);
+
// Read the chunk data and decompress if needed
if (compSize)
vdxData = _file->readStream(compSize);
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