diff options
author | Vhati | 2018-11-12 16:48:06 -0500 |
---|---|---|
committer | Filippos Karapetis | 2018-11-12 23:48:06 +0200 |
commit | b203b61b38e812e47a81f9ed283b1d738e93753a (patch) | |
tree | 47c6f3594d690f26d620725b7e9111b9d3a02e33 /engines/sci/engine | |
parent | 3d93f78efac9e81bd07e423e3970801e6cd86caf (diff) | |
download | scummvm-rg350-b203b61b38e812e47a81f9ed283b1d738e93753a.tar.gz scummvm-rg350-b203b61b38e812e47a81f9ed283b1d738e93753a.tar.bz2 scummvm-rg350-b203b61b38e812e47a81f9ed283b1d738e93753a.zip |
SCI32: Fix QFG4 autosave stack leak (#1388)
This leak was introduced in commit #a37e388
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/script_patches.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp index 81f058872a..ab1f6b464e 100644 --- a/engines/sci/engine/script_patches.cpp +++ b/engines/sci/engine/script_patches.cpp @@ -7267,10 +7267,17 @@ static const uint16 qg4InnPathfindingPatch[] = { // Note: Glory::save() contains another space freeing loop, but it might be // unreachable. // -// Applies to at least: English CD, English floppy +// Applies to at least: English CD, English floppy, German floppy // Responsible method: Glory::save() // Fixes bug: #10758 static const uint16 qg4AutosaveSignature[] = { + 0x30, SIG_ADDTOOFFSET(+2), // bnt [end the loop] + 0x78, // push1 + 0x39, 0x79, // pushi data + 0x76, // push0 + SIG_ADDTOOFFSET(+2), // CD="lag global29", floppy="lat temp6" + 0x4a, SIG_UINT16(0x0004), // send 04 + 0x36, // push SIG_MAGICDWORD, 0x43, 0x3f, SIG_UINT16(0x0002), // callk CheckFreeSpace[3f], 02 0x18, // not @@ -7278,12 +7285,11 @@ static const uint16 qg4AutosaveSignature[] = { 0x8d, 0x09, // lst temp[9] (savegame file count) 0x35, 0x14, // ldi 20d 0x20, // ge? - 0x30, PATCH_UINT16(0x0038), // bnt [end the loop] SIG_END }; static const uint16 qg4AutosavePatch[] = { - 0x32, PATCH_UINT16(0x0044), // jmp [end the loop] + 0x32, // ... // jmp [end the loop] PATCH_END }; |