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

@@ -440,11 +440,9 @@ AString cFile::ReadWholeFile(const AString & a_FileName)
int cFile::Printf(const char * a_Fmt, ...)
{
AString buf;
va_list args, argsCopy;
va_list args;
va_start(args, a_Fmt);
va_start(argsCopy, a_Fmt);
AppendVPrintf(buf, a_Fmt, args, argsCopy);
va_end(argsCopy);
AppendVPrintf(buf, a_Fmt, args);
va_end(args);
return Write(buf.c_str(), buf.length());
}