(svn r16241) -Fix (r16181): regression failing due to wrongly initialised amount of traps

This commit is contained in:
rubidium 2009-05-06 13:42:31 +00:00
parent ff7f2bdb20
commit bb121a1510

View File

@ -83,7 +83,7 @@ SQVM::SQVM(SQSharedState *ss)
_suspended = SQFalse;
_suspended_target=-1;
_suspended_root = SQFalse;
_suspended_traps=-1;
_suspended_traps=0;
_foreignptr=NULL;
_nnativecalls=0;
_lasterror = _null_;
@ -699,7 +699,7 @@ exception_restore:
for(;;)
{
DecreaseOps(1);
if (ShouldSuspend()) { _suspended = SQTrue; return true; }
if (ShouldSuspend()) { _suspended = SQTrue; _suspended_traps = traps; return true; }
const SQInstruction &_i_ = *ci->_ip++;
//dumpstack(_stackbase);