From 27d0c9aef2d25b4d1f81f5b361f3f1f0ab9efc27 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Mon, 12 Aug 2013 08:42:18 +0200 Subject: [PATCH] Fixed logging into debug console. Was missing the LF at the end. --- source/Log.cpp | 2 +- source/MCLogger.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/source/Log.cpp b/source/Log.cpp index 2b505de5d..c8937c380 100644 --- a/source/Log.cpp +++ b/source/Log.cpp @@ -138,7 +138,7 @@ void cLog::Log(const char * a_Format, va_list argList) #if defined (_WIN32) && defined(_DEBUG) // In a Windows Debug build, output the log to debug console as well: - OutputDebugStringA(Line.c_str()); + OutputDebugStringA((Line + "\n").c_str()); #endif // _WIN32 } diff --git a/source/MCLogger.cpp b/source/MCLogger.cpp index de0fcae2e..2870d8ba1 100644 --- a/source/MCLogger.cpp +++ b/source/MCLogger.cpp @@ -75,7 +75,9 @@ cMCLogger::~cMCLogger() m_Log->Log("--- Stopped Log ---\n"); delete m_Log; if (this == s_MCLogger) + { s_MCLogger = NULL; + } }