From fd8cf5dee5994bcbbc226144dc556a8623a07180 Mon Sep 17 00:00:00 2001 From: AndywinXp Date: Sat, 3 Jun 2023 12:34:36 +0200 Subject: [PATCH] SCUMM: ZAK (FM-Towns): Fix bug #14387 This fixes a crash when loading from the GMM save states which had been created from the original menu. This also fixes the auto-close of the menu when a game is loaded from the original menu. --- engines/scumm/saveload.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp index 06734cb1f87..f8c71d71165 100644 --- a/engines/scumm/saveload.cpp +++ b/engines/scumm/saveload.cpp @@ -1858,8 +1858,11 @@ void ScummEngine::saveLoadWithSerializer(Common::Serializer &s) { for (int v = 102 + 6; v <= 111; v++) VAR(v) = 0; - // make sure the appropriate verbs and arrows are displayed - runInventoryScript(0); + // Make sure the appropriate verbs and arrows are displayed. + // We avoid doing that in room 50 (save room) since it can crash + // the game and trigger several unwanted side effects (bug #14387). + if (_currentRoom != 50) + runInventoryScript(0); } //