1
0
Fork 0

Fix: [Script] SQOpsLimiter had no effect for native valuator/filter (#14322)

pull/14326/head
Loïc Guilloux 2025-06-03 14:05:29 +02:00 committed by GitHub
parent ea0b3983a5
commit 9e8fc8da48
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -977,6 +977,10 @@ SQRESULT sq_call(HSQUIRRELVM v,SQInteger params,SQBool retval,SQBool raiseerror,
if(!v->_suspended) { if(!v->_suspended) {
v->Pop(params);//pop closure and args v->Pop(params);//pop closure and args
} }
if (!v->_can_suspend && v->IsOpsTillSuspendError()) {
v->Raise_Error(fmt::format("excessive CPU usage in {}", v->_ops_till_suspend_error_label));
return SQ_ERROR;
}
if(retval){ if(retval){
v->Push(res); return SQ_OK; v->Push(res); return SQ_OK;
} }