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