From 7d2fafc0f889fe27959785defb936d26dddf4d32 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Thu, 16 Jul 2020 14:46:42 +0200 Subject: [PATCH] msvcrt: Don't use tolowerW in _towlower_l. Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- dlls/msvcrt/wcs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index 29cad7c44e1..f715832c264 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -92,6 +92,7 @@ MSVCRT_wchar_t* CDECL MSVCRT__wcsdup( const MSVCRT_wchar_t* str ) int CDECL MSVCRT__towlower_l(MSVCRT_wint_t c, MSVCRT__locale_t locale) { MSVCRT_pthreadlocinfo locinfo; + MSVCRT_wchar_t ret; if(!locale) locinfo = get_locinfo(); @@ -104,7 +105,9 @@ int CDECL MSVCRT__towlower_l(MSVCRT_wint_t c, MSVCRT__locale_t locale) return c; } - return tolowerW(c); + if(!LCMapStringW(locinfo->lc_handle[MSVCRT_LC_CTYPE], LCMAP_LOWERCASE, &c, 1, &ret, 1)) + return c; + return ret; } /*********************************************************************