msvcrt: printf fix

Rein Klazes wijn at wanadoo.nl
Thu Apr 14 02:43:24 CDT 2005


Hi,

fixes "%*.*f" 

Changelog:

dlls/msvcrt	: wcs.c

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

Rein.
-------------- next part --------------
--- wine/dlls/msvcrt/wcs.c	2005-03-11 08:24:39.000000000 +0100
+++ mywine/dlls/msvcrt/wcs.c	2005-04-14 09:35:40.000000000 +0200
@@ -399,6 +399,7 @@ static int pf_vsnprintf( pf_output *out,
     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,
 
         /* 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;


More information about the wine-patches mailing list