From 044fa19470fff92dcd8a8b0f14a5a34b175af793 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 29 Jul 2005 06:12:23 +0000 Subject: [PATCH] Fixed bug where callfunc crashes --- amxmodx/amxmodx.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/amxmodx/amxmodx.cpp b/amxmodx/amxmodx.cpp index d2b503d5..0a0059f3 100755 --- a/amxmodx/amxmodx.cpp +++ b/amxmodx/amxmodx.cpp @@ -2593,13 +2593,15 @@ static cell AMX_NATIVE_CALL callfunc_end(AMX *amx, cell *params) g_CallFunc_Plugin = NULL; g_CallFunc_CurParam = 0; + AMX *pAmx = plugin->getAMX(); + // actual call // Pawn - push parameters in reverse order for (int i=curParam-1; i>=0; i--) { - amx_Push(amx, gparams[i]); + amx_Push(pAmx, gparams[i]); } - if ((err = amx_Exec(plugin->getAMX(), &retVal, func) != AMX_ERR_NONE)) + if ((err = amx_Exec(pAmx, &retVal, func) != AMX_ERR_NONE)) { return 0; }