From adfe7de08e09d7ba478da78bcff9e4ae8a8ebb36 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 27 Sep 2005 19:51:23 +0000 Subject: [PATCH] callfunc_begin_i should not take -1 --- amxmodx/amxmodx.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/amxmodx/amxmodx.cpp b/amxmodx/amxmodx.cpp index e606fd88..88fa0c33 100755 --- a/amxmodx/amxmodx.cpp +++ b/amxmodx/amxmodx.cpp @@ -3046,6 +3046,12 @@ static cell AMX_NATIVE_CALL callfunc_begin_i(AMX *amx, cell *params) if (!plugin) 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])) return -2;