Fix GetFunctionByName ignoring its plugin handle (#2508)

This commit is contained in:
Mikusch
2026-07-14 10:41:40 +02:00
committed by GitHub
parent bd1bde7def
commit 0732992c4f
+1 -1
View File
@@ -129,7 +129,7 @@ static cell_t sm_GetFunctionByName(IPluginContext *pContext, const cell_t *param
pContext->LocalToString(params[2], &name);
/* Get public function index */
if (pContext->GetBaseRuntime()->FindPublicByName(name, &idx) == SP_ERROR_NOT_FOUND)
if (pPlugin->GetBaseContext()->GetBaseRuntime()->FindPublicByName(name, &idx) == SP_ERROR_NOT_FOUND)
{
/* Return INVALID_FUNCTION if not found */
return pContext->GetNullFunctionValue();