[Scummvm-git-logs] scummvm master -> 389c6725ea00b9c9618335bf765efae75fd3514f
sev-
noreply at scummvm.org
Fri Dec 2 09:57:10 UTC 2022
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:
389c6725ea DIRECTOR: Do not crash when script dumping is requested
Commit: 389c6725ea00b9c9618335bf765efae75fd3514f
https://github.com/scummvm/scummvm/commit/389c6725ea00b9c9618335bf765efae75fd3514f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-12-02T10:56:43+01:00
Commit Message:
DIRECTOR: Do not crash when script dumping is requested
Changed paths:
engines/director/archive.cpp
diff --git a/engines/director/archive.cpp b/engines/director/archive.cpp
index e84558bfe8e..c575b30c766 100644
--- a/engines/director/archive.cpp
+++ b/engines/director/archive.cpp
@@ -542,6 +542,16 @@ bool RIFXArchive::openStream(Common::SeekableReadStream *stream, uint32 startOff
stream->seek(startOffset);
stream->read(dumpData, sz);
stream->seek(startOffset + 8);
+
+ // Add the padding data to match the file size
+ endianStream.seek(sz - 4);
+ uint32 _junk = endianStream.readUint32();
+ if (_junk != 0) {
+ dumpStream->seek(sz - 4);
+ dumpStream->writeUint32BE(0);
+ }
+
+ endianStream.seek(startOffset + moreOffset + 8);
}
_rifxType = endianStream.readUint32();
@@ -566,14 +576,6 @@ bool RIFXArchive::openStream(Common::SeekableReadStream *stream, uint32 startOff
break;
}
- // Add the padding data to match the file size
- endianStream.seek(sz - 4);
- uint32 _junk = endianStream.readUint32();
- if (_junk != 0) {
- dumpStream->seek(sz - 4);
- dumpStream->writeUint32BE(0);
- }
-
// Now that the dump data has been patched, actually dump it.
if (dumpData) {
Common::DumpFile out;
More information about the Scummvm-git-logs
mailing list