1
0
Fork 0

(svn r23962) -Fix [FS#5068]: [Script] Infinite recursion within a script wasn't caught properly, so they could cause crashes of OpenTTD instead of the AI

release/1.2
rubidium 2012-02-17 21:49:53 +00:00
parent 0ba47deca1
commit 703ef5b7b6
1 changed files with 4 additions and 0 deletions

View File

@ -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]; \