callfunc_begin_i should not take -1

This commit is contained in:
David Anderson 2005-09-27 19:51:23 +00:00
parent 116536fe36
commit adfe7de08e

View File

@ -3046,6 +3046,12 @@ static cell AMX_NATIVE_CALL callfunc_begin_i(AMX *amx, cell *params)
if (!plugin) if (!plugin)
return -1; return -1;
if (params[1] < 0)
{
LogError(amx, AMX_ERR_NATIVE, "Public function %d is invalid", params[1]);
return -1;
}
if (!plugin->isExecutable(params[1])) if (!plugin->isExecutable(params[1]))
return -2; return -2;