From 21caa9a0de696b1c01f2f48fe453e415d3e4d975 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 13 Oct 2005 05:27:13 +0000 Subject: [PATCH] Really fixed callfunc this time (debugger invocation error) --- amxmodx/amxmodx.cpp | 9 +++++---- amxmodx/debugger.cpp | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/amxmodx/amxmodx.cpp b/amxmodx/amxmodx.cpp index c533ee1d..8128d0ae 100755 --- a/amxmodx/amxmodx.cpp +++ b/amxmodx/amxmodx.cpp @@ -3099,10 +3099,6 @@ static cell AMX_NATIVE_CALL callfunc_end(AMX *amx, cell *params) // call the func cell retVal; int err; - Debugger *pDebugger = (Debugger *)amx->userdata[UD_DEBUGGER]; - - if (pDebugger) - pDebugger->BeginExec(); // copy the globs so the called func can also use callfunc cell gparams[CALLFUNC_MAXPARAMS]; @@ -3121,6 +3117,11 @@ static cell AMX_NATIVE_CALL callfunc_end(AMX *amx, cell *params) AMX *pAmx = plugin->getAMX(); + Debugger *pDebugger = (Debugger *)pAmx->userdata[UD_DEBUGGER]; + + if (pDebugger) + pDebugger->BeginExec(); + // actual call // Pawn - push parameters in reverse order for (int i = curParam - 1; i >= 0; i--) diff --git a/amxmodx/debugger.cpp b/amxmodx/debugger.cpp index 4c760a81..5837ec00 100755 --- a/amxmodx/debugger.cpp +++ b/amxmodx/debugger.cpp @@ -469,7 +469,7 @@ int Debugger::FormatError(char *buffer, size_t maxLength) if (m_pAmx->alt < 0) { //take a guess that it's local - addr = m_pAmx->alt - pTrace->frm; + addr = m_pAmx->alt - pTrace->frm; v_class = 1; } else { //take a guess that it's a global