Revert Call_Finish() to correctly return an error code.

Bug: issue #2474
This commit is contained in:
David Anderson
2026-06-04 19:33:54 -07:00
parent 518f1f6f51
commit 46458cdbfe
+3 -2
View File
@@ -563,8 +563,9 @@ static cell_t sm_CallFinish(IPluginContext *pContext, const cell_t *params)
{
IPluginFunction *pFunction = s_pFunction;
ResetCall();
DetectExceptions eh(pContext);
if (!pFunction->Invoke(local_args, result))
return 0;
return eh.Code();
} else {
IForward *pForward = s_pForward;
ResetCall();
@@ -572,7 +573,7 @@ static cell_t sm_CallFinish(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeErrorEx(err, nullptr);
}
return 1;
return SP_ERROR_NONE;
}
static cell_t sm_CallCancel(IPluginContext *pContext, const cell_t *params)