[Scummvm-git-logs] scummvm branch-2-5 -> 9f9dd7ab9f0fa262b3937c26f7df02895c11f7b5

eriktorbjorn noreply at scummvm.org
Mon Nov 29 06:33:43 UTC 2021


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
846e19d38c SCUMM: Don't try to apply workarounds to unloaded resources...
9f9dd7ab9f NEWS: Mention fix for crash loading HE savegames


Commit: 846e19d38c2032b3ea8668a4d4dcd46bf3c44be7
    https://github.com/scummvm/scummvm/commit/846e19d38c2032b3ea8668a4d4dcd46bf3c44be7
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2021-11-29T07:32:39+01:00

Commit Message:
SCUMM: Don't try to apply workarounds to unloaded resources...

...because ScummVM will crash trying to do so.

This was discovered in bugs #13111 and #13113, where loading a HE
savegame does not load sound resource 1 but still tried to apply
workarounds to it. I don't know if this is the only case.

Changed paths:
    engines/scumm/resource.cpp


diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index cecac1bf62..47b3a5433b 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -1650,6 +1650,12 @@ const char *nameOfResType(ResType type) {
 }
 
 void ScummEngine::applyWorkaroundIfNeeded(ResType type, int idx) {
+	// The resource isn't always loaded into memory, in which case no
+	// workaround is needed. This happens when loading some HE savegames
+	// where sound resource 1 isn't loaded. Possibly other cases as well.
+	if (!_res->isResourceLoaded(type, idx))
+		return;
+
 	int size = getResourceSize(type, idx);
 
 	// WORKAROUND: FM-TOWNS Zak used the extra 40 pixels at the bottom to increase the inventory to 10 items


Commit: 9f9dd7ab9f0fa262b3937c26f7df02895c11f7b5
    https://github.com/scummvm/scummvm/commit/9f9dd7ab9f0fa262b3937c26f7df02895c11f7b5
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2021-11-29T07:33:28+01:00

Commit Message:
NEWS: Mention fix for crash loading HE savegames

Changed paths:
    NEWS.md


diff --git a/NEWS.md b/NEWS.md
index d2b61ed9b1..bbda9e453c 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -29,6 +29,7 @@ For a more comprehensive changelog of the latest experimental code, see:
      versions of Loom and Indiana Jones and the Last Crusade.
    - Improved OPL3 sound emulation for Sam&Max.
    - Fixed music not looping in The Dig.
+   - Fixed crash when loading savegames from Humongous Entertainment games.
 
 TwinE:
    - Numerous bugfixes and stability improvements.




More information about the Scummvm-git-logs mailing list