callfunc_begin_i should not take -1
This commit is contained in:
parent
116536fe36
commit
adfe7de08e
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user