aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--saga/sthread.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/saga/sthread.cpp b/saga/sthread.cpp
index ab1a475a25..029841dac5 100644
--- a/saga/sthread.cpp
+++ b/saga/sthread.cpp
@@ -333,7 +333,7 @@ void Script::runThread(ScriptThread *thread, uint instructionLimit) {
_vm->_console->DebugPrintf(S_WARN_PREFIX "%X: Script function %d failed.\n", thread->_instructionOffset, scriptFunctionReturnValue);
}
- if (scriptFunction == SF_gotoScene) { // SF_gotoScene
+ if (functionNumber == 16) { // SF_gotoScene
instructionCount = instructionLimit; // break the loop
break;
}