# HG changeset patch # User Beri Levi berilevi@gmail.com # Date 1377722859 -10800 # Node ID 0356a84be1cf5d9d98e0821b86787930caab292d # Parent 61451d5980bf05d081a5ab37b5f326474754b42e uses std funcs instead diff -r 61451d5980bf -r 0356a84be1cf Log.cpp --- a/Log.cpp Wed Aug 28 22:10:13 2013 +0200 +++ b/Log.cpp Wed Aug 28 23:47:39 2013 +0300 @@ -1,13 +1,11 @@ #include "Log.h" - #include #include + HANDLE hStdOut = nullptr; - - void Log::Initialize() { if (AllocConsole()) @@ -21,15 +19,12 @@ return; va_list args; - wchar_t pMsg[8192]; va_start(args, pFormat); - vswprintf_s(pMsg, 8192, pFormat, args); + vwprintf_s(pFormat, args); va_end(args); + puts("\r\n"); - DWORD w; - WriteConsole(hStdOut, pMsg, lstrlenW(pMsg), &w, nullptr); - WriteConsole(hStdOut, L"\r\n", 2, &w, nullptr); } //----- (004BE386) --------------------------------------------------------