aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/director/cast.cpp9
-rw-r--r--engines/director/score.cpp2
2 files changed, 10 insertions, 1 deletions
diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index 667fc248ea..892ac48f8c 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -45,6 +45,15 @@ BitmapCast::BitmapCast(Common::ReadStreamEndian &stream, uint16 version) {
boundingRect = Score::readRect(stream);
regX = stream.readUint16();
regY = stream.readUint16();
+
+ int tail = 0;
+
+ while (!stream.eos()) {
+ stream.readByte();
+ tail++;
+ }
+
+ warning("BitmapCast: %d bytes left", tail);
}
modified = 0;
}
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 819ae26830..8a80e30765 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -436,7 +436,7 @@ void Score::loadCastData(Common::SeekableSubReadStreamEndian &stream, uint16 id)
debugC(3, kDebugLoading, "CASt: id: %d type: %x size1: %d size2: %d (%x) size3: %d unk1: %d unk2: %d unk3: %d",
id, castType, size1, size2, size2, size3, unk1, unk2, unk3);
- byte *data = (byte *)calloc(size1 + 16, 1);
+ byte *data = (byte *)calloc(size1, 1); // 16 is for bounding rects
stream.read(data, size1 + 16);
Common::MemoryReadStreamEndian castStream(data, size1 + 16, stream.isBE());