aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2019-12-26 17:30:28 +0100
committerEugene Sandulenko2019-12-26 17:30:28 +0100
commitba834b628926f065aad57bf55a31ab4d2e3075c8 (patch)
tree0554b70bf047f0be05349f4eeb48c6a9f64aa882
parent043acc1cccd4d30afc4c6c296fd9d8025e50c25a (diff)
downloadscummvm-rg350-ba834b628926f065aad57bf55a31ab4d2e3075c8.tar.gz
scummvm-rg350-ba834b628926f065aad57bf55a31ab4d2e3075c8.tar.bz2
scummvm-rg350-ba834b628926f065aad57bf55a31ab4d2e3075c8.zip
DIRECTOR: Fix label loading
-rw-r--r--engines/director/score.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 12928ddd8b..fe2241d65a 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -897,13 +897,13 @@ void Score::loadLabels(Common::SeekableSubReadStreamEndian &stream) {
}
_labels = new Common::SortedArray<Label *>(compareLabels);
- uint16 count = stream.readUint16();
+ uint16 count = stream.readUint16() + 1;
uint32 offset = count * 4 + 2;
uint16 frame = stream.readUint16();
uint32 stringPos = stream.readUint16() + offset;
- for (uint16 i = 0; i < count; i++) {
+ for (uint16 i = 1; i < count; i++) {
uint16 nextFrame = stream.readUint16();
uint32 nextStringPos = stream.readUint16() + offset;
uint32 streamPos = stream.pos();