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:
4
src/3rdparty/squirrel/squirrel/sqapi.cpp
vendored
4
src/3rdparty/squirrel/squirrel/sqapi.cpp
vendored
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user