[Scummvm-git-logs] scummvm master -> af94562bbe8e7d22f48576ff551229c88de79ca0
sev-
noreply at scummvm.org
Fri Dec 2 09:40:16 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:
af94562bbe DIRECTOR: Fix dumped movies from .exe files. Patch courtesy of eientei
Commit: af94562bbe8e7d22f48576ff551229c88de79ca0
https://github.com/scummvm/scummvm/commit/af94562bbe8e7d22f48576ff551229c88de79ca0
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-12-02T10:39:59+01:00
Commit Message:
DIRECTOR: Fix dumped movies from .exe files. Patch courtesy of eientei
Changed paths:
engines/director/archive.cpp
diff --git a/engines/director/archive.cpp b/engines/director/archive.cpp
index 5878c8e0e52..e84558bfe8e 100644
--- a/engines/director/archive.cpp
+++ b/engines/director/archive.cpp
@@ -530,7 +530,7 @@ bool RIFXArchive::openStream(Common::SeekableReadStream *stream, uint32 startOff
Common::SeekableReadStreamEndianWrapper endianStream(stream, _isBigEndian, DisposeAfterUse::NO);
endianStream.seek(startOffset + moreOffset + 4);
- uint32 sz = endianStream.readUint32(); // size
+ uint32 sz = endianStream.readUint32() + 8; // size
// If it is an embedded file, dump it if requested.
// Start by copying the movie data to a new buffer.
@@ -566,6 +566,14 @@ 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