From 00d8ffe5033489dd1809e2bf92a5c3253d644823 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 4 Oct 2004 20:36:21 +0000 Subject: [PATCH] Fixed a debug trace output --- amxmodx/modules.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/amxmodx/modules.cpp b/amxmodx/modules.cpp index dcb0c805..5658c097 100755 --- a/amxmodx/modules.cpp +++ b/amxmodx/modules.cpp @@ -1189,7 +1189,12 @@ void LogError(AMX *amx, int err, const char *fmt, ...) if (!dbg || !(dbg->tail)) { - GenericError(amx, err, amx->curline, buf, NULL); + if (dbg && amx->curfile < dbg->numFiles && amx->curfile >= 0) + { + GenericError(amx, err, amx->curline, buf, dbg->files[amx->curfile]); + } else { + GenericError(amx, err, amx->curline, buf, NULL); + } AMXXLOG_Log("[AMXX] %s", buf); AMXXLOG_Log("%s", vbuf); } else {