Merge pull request #125 from Arkshine/fix-abort

Don't show blank line in abort() with AMX_ERR_NONE (bug 6233).
This commit is contained in:
Vincent Herbet 2014-08-19 18:15:24 +02:00
commit 9eedca0a98

View File

@ -533,13 +533,17 @@ void Debugger::DisplayTrace(const char *message)
AMXXLOG_Error("%s", message); AMXXLOG_Error("%s", message);
char buffer[512]; char buffer[512];
FormatError(buffer, sizeof(buffer)-1); int length = FormatError(buffer, sizeof(buffer)-1);
const char *filename = _GetFilename(); const char *filename = _GetFilename();
const char *version = _GetVersion(); const char *version = _GetVersion();
AMXXLOG_Error("[AMXX] Displaying debug trace (plugin \"%s\", version \"%s\")", filename, version); AMXXLOG_Error("[AMXX] Displaying debug trace (plugin \"%s\", version \"%s\")", filename, version);
AMXXLOG_Error("[AMXX] %s", buffer);
if (length != -1) // Don't show blank line if AMX_ERR_NONE is set since there is no error message.
{
AMXXLOG_Error("[AMXX] %s", buffer);
}
int count = 0; int count = 0;
long lLine; long lLine;