diff --git a/dlls/ntdll/printf.c b/dlls/ntdll/printf.c index 65dc62dff4e..b6b8b6c009b 100644 --- a/dlls/ntdll/printf.c +++ b/dlls/ntdll/printf.c @@ -410,6 +410,11 @@ static void pf_fixup_exponent( char *buf ) } } +static inline BOOL isDigit(WCHAR c) +{ + return c >= '0' && c <= '9'; +} + /********************************************************************* * pf_vsnprintf (INTERNAL) * @@ -490,7 +495,7 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, __ms_va_list valis } p++; } - else while( isdigit(*p) ) + else while( isDigit(*p) ) { flags.FieldLength *= 10; flags.FieldLength += *p++ - '0'; @@ -507,7 +512,7 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, __ms_va_list valis flags.Precision = va_arg( valist, int ); p++; } - else while( isdigit(*p) ) + else while( isDigit(*p) ) { flags.Precision *= 10; flags.Precision += *p++ - '0'; @@ -531,7 +536,7 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, __ms_va_list valis } else if( *(p+1) == '3' && *(p+2) == '2' ) p += 3; - else if( isdigit(*(p+1)) || *(p+1) == 0 ) + else if( isDigit(*(p+1)) || *(p+1) == 0 ) break; else p++;