1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-22 03:42:41 +01:00

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

This commit is contained in:
Loïc Guilloux
2025-06-03 14:05:29 +02:00
committed by GitHub
parent ea0b3983a5
commit 9e8fc8da48

View File

@@ -977,6 +977,10 @@ SQRESULT sq_call(HSQUIRRELVM v,SQInteger params,SQBool retval,SQBool raiseerror,
if(!v->_suspended) {
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){
v->Push(res); return SQ_OK;
}