[Scummvm-git-logs] scummvm master -> d84535192ac02351cf5a7a04005aaa6fa097c9bb
sev-
sev at scummvm.org
Wed Mar 22 19:36:10 CET 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d84535192a DIRECTOR: Fix data sizes when reading from archives
Commit: d84535192ac02351cf5a7a04005aaa6fa097c9bb
https://github.com/scummvm/scummvm/commit/d84535192ac02351cf5a7a04005aaa6fa097c9bb
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-03-22T19:34:09+01:00
Commit Message:
DIRECTOR: Fix data sizes when reading from archives
Changed paths:
engines/director/score.cpp
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 609c8ab..4b65044 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -629,15 +629,15 @@ void Score::setCastMemberModified(int castId) {
void Score::loadLabels(Common::SeekableSubReadStreamEndian &stream) {
_labels = new Common::SortedArray<Label *>(compareLabels);
uint16 count = stream.readUint16() + 1;
- uint16 offset = count * 4 + 2;
+ uint32 offset = count * 4 + 2;
uint16 frame = stream.readUint16();
- uint16 stringPos = stream.readUint16() + offset;
+ uint32 stringPos = stream.readUint16() + offset;
for (uint16 i = 0; i < count; i++) {
uint16 nextFrame = stream.readUint16();
- uint16 nextStringPos = stream.readUint16() + offset;
- uint16 streamPos = stream.pos();
+ uint32 nextStringPos = stream.readUint16() + offset;
+ uint32 streamPos = stream.pos();
stream.seek(stringPos);
Common::String label;
@@ -669,18 +669,18 @@ void Score::loadActions(Common::SeekableSubReadStreamEndian &stream) {
debugC(2, kDebugLoading, "****** Loading Actions");
uint16 count = stream.readUint16() + 1;
- uint16 offset = count * 4 + 2;
+ uint32 offset = count * 4 + 2;
byte id = stream.readByte();
byte subId = stream.readByte(); // I couldn't find how it used in continuity (except print). Frame actionId = 1 byte.
- uint16 stringPos = stream.readUint16() + offset;
+ uint32 stringPos = stream.readUint16() + offset;
for (uint16 i = 0; i < count; i++) {
uint16 nextId = stream.readByte();
byte nextSubId = stream.readByte();
- uint16 nextStringPos = stream.readUint16() + offset;
- uint16 streamPos = stream.pos();
+ uint32 nextStringPos = stream.readUint16() + offset;
+ uint32 streamPos = stream.pos();
stream.seek(stringPos);
@@ -1024,7 +1024,7 @@ void Score::loadFontMap(Common::SeekableSubReadStreamEndian &stream) {
uint16 count = stream.readUint16();
uint32 offset = (count * 2) + 2;
- uint16 currentRawPosition = offset;
+ uint32 currentRawPosition = offset;
for (uint16 i = 0; i < count; i++) {
uint16 id = stream.readUint16();
More information about the Scummvm-git-logs
mailing list