aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/script_v2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/kyra/script_v2.cpp b/engines/kyra/script_v2.cpp
index 13b7b6ae6d..4599d0347d 100644
--- a/engines/kyra/script_v2.cpp
+++ b/engines/kyra/script_v2.cpp
@@ -272,8 +272,8 @@ int KyraEngine_v2::o2_addSpecialExit(ScriptState *script) {
if (_specialExitCount < 5) {
_specialExitTable[_specialExitCount+0] = stackPos(0);
_specialExitTable[_specialExitCount+5] = stackPos(1);
- _specialExitTable[_specialExitCount+10] = stackPos(2);
- _specialExitTable[_specialExitCount+15] = stackPos(3);
+ _specialExitTable[_specialExitCount+10] = stackPos(2) + stackPos(0) - 1;
+ _specialExitTable[_specialExitCount+15] = stackPos(3) + stackPos(1) - 1;
_specialExitTable[_specialExitCount+20] = stackPos(4);
++_specialExitCount;
}