From e2d9a6cc7156cb6fd904e700d60228babd10b08e Mon Sep 17 00:00:00 2001 From: spx Date: Tue, 14 Dec 2010 15:11:26 +0000 Subject: [PATCH] Fixed: Now uses buffer strictly in DebugLog/LuaLog. --- Library/Litestep.cpp | 2 +- Library/lua/LuaManager.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Litestep.cpp b/Library/Litestep.cpp index 6ed10b35..54934ac2 100644 --- a/Library/Litestep.cpp +++ b/Library/Litestep.cpp @@ -605,7 +605,7 @@ void DebugLog(const WCHAR* format, ... ) WCHAR buffer[4096]; va_list args; va_start( args, format ); - _vsnwprintf( buffer, 4096, format, args ); + _vsnwprintf_s( buffer, 4096, _TRUNCATE, format, args ); LSLog(LOG_DEBUG, L"Rainmeter", buffer); va_end(args); } diff --git a/Library/lua/LuaManager.cpp b/Library/lua/LuaManager.cpp index 49ff2f70..dff9d3fc 100644 --- a/Library/lua/LuaManager.cpp +++ b/Library/lua/LuaManager.cpp @@ -59,7 +59,7 @@ void LuaManager::LuaLog(const char* format, ... ) va_list args; va_start( args, format ); - _vsnprintf(buffer, 4096, format, args ); + _vsnprintf_s(buffer, 4096, _TRUNCATE, format, args ); #ifndef _DEBUG // Forcing output to the Debug Output window! @@ -69,6 +69,6 @@ void LuaManager::LuaLog(const char* format, ... ) std::wstring str = ConvertToWide(buffer); - LSLog(3,L"Lua", str.c_str()); + LSLog(LOG_NOTICE, L"Lua", str.c_str()); va_end(args); } \ No newline at end of file