Fixed: Now uses buffer strictly in DebugLog/LuaLog.

This commit is contained in:
spx 2010-12-14 15:11:26 +00:00
parent 8c169e4d21
commit e2d9a6cc71
2 changed files with 3 additions and 3 deletions

View File

@ -605,7 +605,7 @@ void DebugLog(const WCHAR* format, ... )
WCHAR buffer[4096]; WCHAR buffer[4096];
va_list args; va_list args;
va_start( args, format ); va_start( args, format );
_vsnwprintf( buffer, 4096, format, args ); _vsnwprintf_s( buffer, 4096, _TRUNCATE, format, args );
LSLog(LOG_DEBUG, L"Rainmeter", buffer); LSLog(LOG_DEBUG, L"Rainmeter", buffer);
va_end(args); va_end(args);
} }

View File

@ -59,7 +59,7 @@ void LuaManager::LuaLog(const char* format, ... )
va_list args; va_list args;
va_start( args, format ); va_start( args, format );
_vsnprintf(buffer, 4096, format, args ); _vsnprintf_s(buffer, 4096, _TRUNCATE, format, args );
#ifndef _DEBUG #ifndef _DEBUG
// Forcing output to the Debug Output window! // Forcing output to the Debug Output window!
@ -69,6 +69,6 @@ void LuaManager::LuaLog(const char* format, ... )
std::wstring str = ConvertToWide(buffer); std::wstring str = ConvertToWide(buffer);
LSLog(3,L"Lua", str.c_str()); LSLog(LOG_NOTICE, L"Lua", str.c_str());
va_end(args); va_end(args);
} }