Changed WPRINTF_ExtractVAPtr to take the address of the va_list to be

able to modify it.
This commit is contained in:
Francis Beaudet 1999-02-17 10:29:03 +00:00 committed by Alexandre Julliard
parent 806e0ed335
commit b9f85a7751
1 changed files with 7 additions and 7 deletions

View File

@ -242,22 +242,22 @@ static UINT32 WPRINTF_GetLen( WPRINTF_FORMAT *format, LPCVOID arg,
/***********************************************************************
* WPRINTF_ExtractVAPtr (Not a Windows API)
*/
static LPVOID WPRINTF_ExtractVAPtr( WPRINTF_FORMAT *format, va_list args )
static LPVOID WPRINTF_ExtractVAPtr( WPRINTF_FORMAT *format, va_list* args )
{
switch(format->type)
{
case WPR_WCHAR:
return (LPVOID)va_arg( args, WCHAR );
return (LPVOID)va_arg( *args, WCHAR );
case WPR_CHAR:
return (LPVOID)va_arg( args, CHAR );
return (LPVOID)va_arg( *args, CHAR );
case WPR_STRING:
return (LPVOID)va_arg( args, LPCSTR);
return (LPVOID)va_arg( *args, LPCSTR);
case WPR_WSTRING:
return (LPVOID)va_arg( args, LPCWSTR);
return (LPVOID)va_arg( *args, LPCWSTR);
case WPR_HEXA:
case WPR_SIGNED:
case WPR_UNSIGNED:
return (LPVOID)va_arg( args, INT32 );
return (LPVOID)va_arg( *args, INT32 );
default:
return NULL;
}
@ -375,7 +375,7 @@ INT32 WINAPI wvsnprintf32A( LPSTR buffer, UINT32 maxlen, LPCSTR spec,
spec++;
if (*spec == '%') { *p++ = *spec++; maxlen--; continue; }
spec += WPRINTF_ParseFormatA( spec, &format );
argPtr = WPRINTF_ExtractVAPtr( &format, args );
argPtr = WPRINTF_ExtractVAPtr( &format, &args );
len = WPRINTF_GetLen( &format, &argPtr, number, maxlen - 1 );
if (!(format.flags & WPRINTF_LEFTALIGN))
for (i = format.precision; i < format.width; i++, maxlen--)