[Scummvm-cvs-logs] CVS: scummvm/saga sthread.cpp,1.104,1.105
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Tue Oct 11 06:24:11 CEST 2005
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19980
Modified Files:
sthread.cpp
Log Message:
Fix stack underflow when Gorrister examines the mirror in IHNM. opReturnV
was popping *twice* the number of parameters that had originally been
pushed.
This appears to have been a bug in the ITE floppy version as well; one that
was fixed in the CD version.
At least that's how I understand it.
Index: sthread.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sthread.cpp,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -d -r1.104 -r1.105
--- sthread.cpp 26 Aug 2005 12:07:31 -0000 1.104
+++ sthread.cpp 11 Oct 2005 13:23:47 -0000 1.105
@@ -308,7 +308,7 @@
addr = thread->baseAddress(scriptS.readByte());
iparam1 = scriptS.readSint16LE();
addr += iparam1;
- *(uint16*)addr = thread->pop();
+ *(uint16*)addr = thread->pop();
break;
// FUNCTION CALL INSTRUCTIONS
@@ -380,8 +380,9 @@
} else {
thread->pop(); //cause it 0
thread->_instructionOffset = thread->pop();
+
+ // Pop all the call parameters off the stack
iparam1 = thread->pop();
- iparam1 += iparam1;
while (iparam1--) {
thread->pop();
}
More information about the Scummvm-git-logs
mailing list