diff options
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/squirrel/squirrel/sqvm.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/3rdparty/squirrel/squirrel/sqvm.h b/src/3rdparty/squirrel/squirrel/sqvm.h index 73b5a0451..4b922c370 100644 --- a/src/3rdparty/squirrel/squirrel/sqvm.h +++ b/src/3rdparty/squirrel/squirrel/sqvm.h @@ -200,6 +200,10 @@ inline SQObjectPtr &stack_get(HSQUIRRELVM v,SQInteger idx){return ((idx>=0)?(v-> #define PUSH_CALLINFO(v,nci){ \ if(v->_callsstacksize == v->_alloccallsstacksize) { \ + if (v->_callsstacksize > 65535) {\ + v->Raise_Error(_SC("stack overflow"));\ + return false;\ + }\ v->GrowCallStack(); \ } \ v->ci = &v->_callsstack[v->_callsstacksize]; \ |