[Scummvm-git-logs] scummvm master -> 57f114cbc3f8ecea0668c732550afc638e3ee302
bluegr
bluegr at gmail.com
Sun Dec 30 13:02:39 CET 2018
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:
57f114cbc3 SCI: Don't try to validate resources added from a Mac resource fork
Commit: 57f114cbc3f8ecea0668c732550afc638e3ee302
https://github.com/scummvm/scummvm/commit/57f114cbc3f8ecea0668c732550afc638e3ee302
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2018-12-30T12:53:23+02:00
Commit Message:
SCI: Don't try to validate resources added from a Mac resource fork
The fix has been authored originally by csnover, adapted from commit ca420e44167e5ee488b4ad547104fa6b976e6f1c
Fixes Trac#10440, Trac#10892.
Changed paths:
engines/sci/resource.cpp
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 2e64b10..b2b422f 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -2103,7 +2103,12 @@ Resource *ResourceManager::updateResource(ResourceId resId, ResourceSource *src,
return res;
}
- if (validateResource(resId, sourceMapLocation, src->getLocationName(), offset, size, volumeFile->size())) {
+ // Resources from MacResourceForkResourceSource do not have a source size
+ // since the source "volume file" is the empty data fork, and they don't
+ // have an offset either since the MacResManager handles this, so trying to
+ // validate these resources using the normal validation would always fail
+ if (src->getSourceType() == kSourceMacResourceFork ||
+ validateResource(resId, sourceMapLocation, src->getLocationName(), offset, size, volumeFile->size())) {
if (res == nullptr) {
res = new Resource(this, resId);
_resMap.setVal(resId, res);
More information about the Scummvm-git-logs
mailing list