Module: wine Branch: master Commit: 073bb1d0b40dc12c8c3fa8a50ec312c42ecda659 URL: https://source.winehq.org/git/wine.git/?a=commit;h=073bb1d0b40dc12c8c3fa8a50...
Author: Piotr Caban piotr@codeweavers.com Date: Tue Mar 26 10:26:51 2019 +0100
ntdll: Use NTDLL_tolower instead of toupper.
Signed-off-by: Piotr Caban piotr@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntdll/ntdll_misc.h | 1 + dlls/ntdll/printf.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index e188907..ca04583 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -258,5 +258,6 @@ NTSTATUS WINAPI RtlHashUnicodeString(PCUNICODE_STRING,BOOLEAN,ULONG,ULONG*); void WINAPI LdrInitializeThunk(CONTEXT*,void**,ULONG_PTR,ULONG_PTR);
/* string functions */ +int __cdecl NTDLL_tolower( int c ); int __cdecl _stricmp( LPCSTR str1, LPCSTR str2 ); #endif diff --git a/dlls/ntdll/printf.c b/dlls/ntdll/printf.c index 8a966304..c1a0194 100644 --- a/dlls/ntdll/printf.c +++ b/dlls/ntdll/printf.c @@ -378,7 +378,7 @@ static void pf_fixup_exponent( char *buf ) { char* tmp = buf;
- while (tmp[0] && toupper(tmp[0]) != 'E') + while (tmp[0] && NTDLL_tolower(tmp[0]) != 'e') tmp++;
if (tmp[0] && (tmp[1] == '+' || tmp[1] == '-') && @@ -637,7 +637,7 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, __ms_va_list valis if( pf_is_double_format( flags.Format ) ) { sprintf( x, fmt, va_arg(valist, double) ); - if (toupper(flags.Format) == 'E' || toupper(flags.Format) == 'G') + if (NTDLL_tolower(flags.Format) == 'e' || NTDLL_tolower(flags.Format) == 'g') pf_fixup_exponent( x ); } else