mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 22:58:09 +00:00
Fix crash on chasm.
svn-id: r18383
This commit is contained in:
parent
1dbf319b59
commit
4f2cfd5feb
@ -1495,7 +1495,7 @@ void Script::SF_text(SCRIPTFUNC_PARAMS) {
|
||||
for (int i = 0; i < nArgs; i++)
|
||||
thread->pop();
|
||||
|
||||
error("STUB: SF_text(), %d args", nArgs);
|
||||
warning("STUB: SF_text(), %d args", nArgs);
|
||||
}
|
||||
|
||||
// Script function #60 (0x3C)
|
||||
|
@ -194,6 +194,7 @@ bool Script::runThread(ScriptThread *thread, uint instructionLimit) {
|
||||
|
||||
byte argumentsCount;
|
||||
uint16 functionNumber;
|
||||
uint16 checkStackTopIndex;
|
||||
ScriptFunctionType scriptFunction;
|
||||
|
||||
int debug_print = 0;
|
||||
@ -342,8 +343,12 @@ bool Script::runThread(ScriptThread *thread, uint instructionLimit) {
|
||||
|
||||
debug(8, "Calling 0x%X %s", functionNumber, _scriptFunctionsList[functionNumber].scriptFunctionName);
|
||||
scriptFunction = _scriptFunctionsList[functionNumber].scriptFunction;
|
||||
checkStackTopIndex = thread->_stackTopIndex + argumentsCount;
|
||||
|
||||
(this->*scriptFunction)(thread, argumentsCount);
|
||||
|
||||
thread->_stackTopIndex = checkStackTopIndex;
|
||||
|
||||
if (scriptFunction == &Saga::Script::sfScriptGotoScene) {
|
||||
return true; // cause abortAllThreads called and _this_ thread destroyed
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user