aboutsummaryrefslogtreecommitdiff
path: root/engines/composer
diff options
context:
space:
mode:
authorAlyssa Milburn2011-07-15 15:18:59 +0200
committerAlyssa Milburn2011-07-15 15:18:59 +0200
commitadd71297bd283516ff3bd75f13bea69b6898adaa (patch)
tree7e7480fa83a7a68902fd8a0f8d65847dec82b2b0 /engines/composer
parent24ca79e740ece52072e026d39f34234c24333c5c (diff)
downloadscummvm-rg350-add71297bd283516ff3bd75f13bea69b6898adaa.tar.gz
scummvm-rg350-add71297bd283516ff3bd75f13bea69b6898adaa.tar.bz2
scummvm-rg350-add71297bd283516ff3bd75f13bea69b6898adaa.zip
COMPOSER: Don't read off the end of pipes.
Diffstat (limited to 'engines/composer')
-rw-r--r--engines/composer/composer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp
index 3651a49328..fba699660d 100644
--- a/engines/composer/composer.cpp
+++ b/engines/composer/composer.cpp
@@ -154,6 +154,9 @@ Pipe::Pipe(Common::SeekableReadStream *stream) {
}
void Pipe::nextFrame() {
+ if (_offset == _stream->size())
+ return;
+
_stream->seek(_offset, SEEK_SET);
uint32 tagCount = _stream->readUint32LE();