1
0

AString logging fix 2

git-svn-id: http://mc-server.googlecode.com/svn/trunk@218 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2012-02-01 14:08:12 +00:00
parent ef196ec22f
commit cb1ce14169
7 changed files with 27 additions and 21 deletions

View File

@@ -69,7 +69,7 @@ void cLog::OpenLog( const char* a_FileName )
#ifdef _WIN32
fopen_s( &m_File, a_FileName, "a+" );
#else
m_File = fopen(a_FileName, "a+" );
m_File = fopen(a_FileName, "a+" );
#endif
}
@@ -94,10 +94,18 @@ void cLog::ClearLog()
void cLog::Log(const char* a_Format, va_list argList)
void cLog::Log(const char * a_Format, va_list argList)
{
AString Message;
AppendVPrintf(Message, a_Format, argList);
if (argList != NULL)
{
AppendVPrintf(Message, a_Format, argList);
}
else
{
// This branch needs to be here because of *nix crashing in vsnprintf() when argList is NULL
Message.assign(a_Format);
}
time_t rawtime;
time ( &rawtime );