Fix decoding printf format in case the field width specifier is a '*'.

This commit is contained in:
Rein Klazes 2005-04-14 11:32:53 +00:00 committed by Alexandre Julliard
parent 8acdd0baa9
commit b6d331d680
1 changed files with 5 additions and 1 deletions

View File

@ -399,6 +399,7 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, va_list valist )
LPCWSTR q, p = format;
pf_flags flags;
TRACE("format is %s\n",debugstr_w(format));
while (*p)
{
q = strchrW( p, '%' );
@ -454,8 +455,11 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, va_list valist )
/* deal with the field width specifier */
flags.FieldLength = 0;
if( *p == '*' )
if( *p == '*' )
{
flags.FieldLength = va_arg( valist, int );
p++;
}
else while( isdigit(*p) )
{
flags.FieldLength *= 10;