[Scummvm-git-logs] scummvm master -> 1e9388846ed2dc33a390755e4eac8f95e59b2785
aquadran
noreply at scummvm.org
Thu Oct 16 19:16:29 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
1e9388846e WINTERMUTE: Fixed bug in game scripts for 'Five Magical Amulets'
Commit: 1e9388846ed2dc33a390755e4eac8f95e59b2785
https://github.com/scummvm/scummvm/commit/1e9388846ed2dc33a390755e4eac8f95e59b2785
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2025-10-16T21:16:25+02:00
Commit Message:
WINTERMUTE: Fixed bug in game scripts for 'Five Magical Amulets'
Changed paths:
engines/wintermute/ad/ad_game.cpp
diff --git a/engines/wintermute/ad/ad_game.cpp b/engines/wintermute/ad/ad_game.cpp
index 11fcbd997ee..c5b72b992dd 100644
--- a/engines/wintermute/ad/ad_game.cpp
+++ b/engines/wintermute/ad/ad_game.cpp
@@ -398,6 +398,15 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
if (act && DID_SUCCEED(act->loadFile(stack->pop()->getString()))) {
addObject(act);
stack->pushNative(act, true);
+
+ // W/A for bug in game script: 'Five Magical Amulets'
+ // Before engine 1.4 MainObject was not invalidated on UnloadObject.
+ // It was used later by engine on already released object in memory.
+ // Engine was fixed in version 1.4, but game scripts were never fixed.
+ // Assign MainObject with new loaded actor.
+ if (BaseEngine::instance().getGameId() == "5ma") {
+ _mainObject = act;
+ }
} else {
SAFE_DELETE(act);
stack->pushNULL();
More information about the Scummvm-git-logs
mailing list