aboutsummaryrefslogtreecommitdiff
path: root/engines/gob
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob')
-rw-r--r--engines/gob/coktelvideo.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/gob/coktelvideo.cpp b/engines/gob/coktelvideo.cpp
index 729927eb94..ef89bc2c19 100644
--- a/engines/gob/coktelvideo.cpp
+++ b/engines/gob/coktelvideo.cpp
@@ -1133,6 +1133,8 @@ CoktelVideo::State Vmd::processFrame(uint16 frame) {
} else if (part.type == kPartTypeVideo) {
state.flags &= ~kStateNoVideoData;
+ uint32 size = part.size;
+
// New palette
if (part.flags & 2) {
uint8 index = _stream->readByte();
@@ -1142,9 +1144,12 @@ CoktelVideo::State Vmd::processFrame(uint16 frame) {
_stream->skip((255 - count) * 3);
state.flags |= kStatePalette;
+
+ size -= (768 + 2);
}
- _stream->read(_frameData, part.size);
+ _stream->read(_frameData, size);
+
if (renderFrame(part.left, part.top, part.right, part.bottom)) {
// Rendering succeeded, merging areas
state.left = MIN(state.left, part.left);