ntdll: Avoid using isdigit() for WCHARs.
Found with Coccinelle. Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
553282a0ff
commit
ea6e51744f
|
@ -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++;
|
||||
|
|
Loading…
Reference in New Issue