[Scummvm-git-logs] scummvm master -> 302a5eb0afa248f2c6dbea7a3fbd9c2c73a5a916
bluegr
noreply at scummvm.org
Sat Jan 7 00:38:11 UTC 2023
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:
302a5eb0af SAGA: Don't close file even after it was overriden by a patch
Commit: 302a5eb0afa248f2c6dbea7a3fbd9c2c73a5a916
https://github.com/scummvm/scummvm/commit/302a5eb0afa248f2c6dbea7a3fbd9c2c73a5a916
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-01-07T02:38:07+02:00
Commit Message:
SAGA: Don't close file even after it was overriden by a patch
Now the file handle is shared among the readers of the same context,
so closing it will close it for all user which leads to a crash.
Changed paths:
engines/saga/resource.cpp
diff --git a/engines/saga/resource.cpp b/engines/saga/resource.cpp
index 3b767e119e1..871a111b688 100644
--- a/engines/saga/resource.cpp
+++ b/engines/saga/resource.cpp
@@ -519,12 +519,6 @@ void Resource::loadResource(ResourceContext *context, uint32 resourceId, ByteArr
error("Resource::loadResource() failed to read");
}
- // ITE uses several patch files which are loaded and then not needed
- // anymore (as they're in memory), so close them here. IHNM uses only
- // 1 patch file, which is reused, so don't close it
- if (resourceData->patchData != nullptr && _vm->getGameId() == GID_ITE)
- context->closeFile();
-
if (_vm->getPlatform() == Common::Platform::kPlatformAmiga &&
resourceBuffer.size() >= 16 && READ_BE_UINT32(resourceBuffer.getBuffer()) == MKTAG('H', 'E', 'A', 'D')
&& READ_BE_UINT32(resourceBuffer.getBuffer() + 12) == MKTAG('P', 'A', 'C', 'K')) {
More information about the Scummvm-git-logs
mailing list