1
0

Another VarArgs fix.

This time using va_copy() on platforms that have it and simple assignment on platforms that don't.
This commit is contained in:
madmaxoft
2014-01-16 08:34:10 +01:00
parent 4974bf2832
commit ba49a32c3a
7 changed files with 39 additions and 43 deletions

View File

@@ -99,10 +99,10 @@ void cLog::ClearLog()
void cLog::Log(const char * a_Format, va_list argList, va_list argListCopy)
void cLog::Log(const char * a_Format, va_list argList)
{
AString Message;
AppendVPrintf(Message, a_Format, argList, argListCopy);
AppendVPrintf(Message, a_Format, argList);
time_t rawtime;
time ( &rawtime );
@@ -149,11 +149,9 @@ void cLog::Log(const char * a_Format, va_list argList, va_list argListCopy)
void cLog::Log(const char * a_Format, ...)
{
va_list argList, argListCopy;
va_list argList;
va_start(argList, a_Format);
va_start(argListCopy, a_Format);
Log(a_Format, argList, argListCopy);
va_end(argListCopy);
Log(a_Format, argList);
va_end(argList);
}