add some stack-condition error checking to sqstdlib registration routines and to sqstd_dofile

This commit is contained in:
zeromus
2016-04-20 21:19:24 -05:00
parent 72135d9a7f
commit b9fc931752
4 changed files with 12 additions and 0 deletions

View File

@ -473,6 +473,8 @@ static const SQRegFunction stringlib_funcs[]={
SQInteger sqstd_register_stringlib(HSQUIRRELVM v)
{
if(sq_gettype(v,-1) != OT_TABLE)
return sq_throwerror(v,_SC("table expected"));
sq_pushstring(v,_SC("regexp"),-1);
sq_newclass(v,SQFalse);
SQInteger i = 0;