Piotr Caban : msvcrt: Don't use strcmpiW in _wcsicoll_l.
Alexandre Julliard
julliard at winehq.org
Tue Jul 14 16:23:38 CDT 2020
Module: wine
Branch: master
Commit: 8fd5ef68cc1b9f55a1d25312a93b700f3aff500e
URL: https://source.winehq.org/git/wine.git/?a=commit;h=8fd5ef68cc1b9f55a1d25312a93b700f3aff500e
Author: Piotr Caban <piotr at codeweavers.com>
Date: Tue Jul 14 20:22:49 2020 +0200
msvcrt: Don't use strcmpiW in _wcsicoll_l.
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msvcrt/wcs.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c
index 70a8d6201f..b6da06ce74 100644
--- a/dlls/msvcrt/wcs.c
+++ b/dlls/msvcrt/wcs.c
@@ -131,7 +131,22 @@ int CDECL MSVCRT__wcsicoll_l(const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* s
locinfo = locale->locinfo;
if(!locinfo->lc_handle[MSVCRT_LC_COLLATE])
- return strcmpiW(str1, str2);
+ {
+ MSVCRT_wchar_t c1, c2;
+
+ do
+ {
+ c1 = *str1++;
+ if (c1 >= 'A' && c1 <= 'Z')
+ c1 += 'a' - 'A';
+
+ c2 = *str2++;
+ if (c2 >= 'A' && c2 <= 'Z')
+ c2 += 'a' - 'A';
+ } while(c1 && (c1 == c2));
+ return c1 - c2;
+ }
+
return CompareStringW(locinfo->lc_handle[MSVCRT_LC_COLLATE], NORM_IGNORECASE,
str1, -1, str2, -1)-CSTR_EQUAL;
}
More information about the wine-cvs
mailing list