[Scummvm-git-logs] scummvm master -> b00049732f66eaeeb4abf57586201e60c186a008
bluegr
bluegr at gmail.com
Mon Apr 15 21:48:23 CEST 2019
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:
b00049732f SCI: Fix diskdump patch file headers
Commit: b00049732f66eaeeb4abf57586201e60c186a008
https://github.com/scummvm/scummvm/commit/b00049732f66eaeeb4abf57586201e60c186a008
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2019-04-15T22:48:19+03:00
Commit Message:
SCI: Fix diskdump patch file headers
Fix 'diskdump' debugger command creating an additional patch file
header for resources that were loaded from patch files
Changed paths:
engines/sci/resource.cpp
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index df91fb8..8e4a6d1 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -224,10 +224,14 @@ void Resource::unalloc() {
}
void Resource::writeToStream(Common::WriteStream *stream) const {
- stream->writeByte(getType() | 0x80); // 0x80 is required by old Sierra SCI, otherwise it wont accept the patch file
- stream->writeByte(_headerSize);
- if (_headerSize > 0)
+ if (_headerSize == 0) {
+ // create patch file header
+ stream->writeByte(getType() | 0x80); // 0x80 is required by old Sierra SCI, otherwise it wont accept the patch file
+ stream->writeByte(_headerSize);
+ } else {
+ // use existing patch file header
stream->write(_header, _headerSize);
+ }
stream->write(_data, _size);
}
More information about the Scummvm-git-logs
mailing list