[Scummvm-cvs-logs] CVS: scummvm/saga sfuncs.cpp,1.123,1.124 sthread.cpp,1.81,1.82
Eugene Sandulenko
sev at users.sourceforge.net
Mon Jun 13 06:45:21 CEST 2005
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26676
Modified Files:
sfuncs.cpp sthread.cpp
Log Message:
Fix crash on chasm.
Index: sfuncs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sfuncs.cpp,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -d -r1.123 -r1.124
--- sfuncs.cpp 12 Jun 2005 21:21:14 -0000 1.123
+++ sfuncs.cpp 13 Jun 2005 13:40:28 -0000 1.124
@@ -1495,7 +1495,7 @@
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)
Index: sthread.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sthread.cpp,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- sthread.cpp 12 May 2005 15:11:32 -0000 1.81
+++ sthread.cpp 13 Jun 2005 13:40:28 -0000 1.82
@@ -194,6 +194,7 @@
byte argumentsCount;
uint16 functionNumber;
+ uint16 checkStackTopIndex;
ScriptFunctionType scriptFunction;
int debug_print = 0;
@@ -342,8 +343,12 @@
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
}
More information about the Scummvm-git-logs
mailing list