Piotr Caban : msvcrt: Copy wcschr implementation from ntdll.

Alexandre Julliard julliard at winehq.org
Tue Jul 21 15:40:21 CDT 2020


Module: wine
Branch: master
Commit: 5d9d0b84655c8a400a9f7339c404842b194aa9f2
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=5d9d0b84655c8a400a9f7339c404842b194aa9f2

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Tue Jul 21 12:21:45 2020 +0200

msvcrt: Copy wcschr implementation from ntdll.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcrt/wcs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c
index 31ec0dd33f..e193c08593 100644
--- a/dlls/msvcrt/wcs.c
+++ b/dlls/msvcrt/wcs.c
@@ -2663,7 +2663,8 @@ int CDECL MSVCRT_towupper(MSVCRT_wint_t c)
  */
 MSVCRT_wchar_t* CDECL MSVCRT_wcschr(const MSVCRT_wchar_t *str, MSVCRT_wchar_t ch)
 {
-    return strchrW(str, ch);
+    do { if (*str == ch) return (WCHAR *)(ULONG_PTR)str; } while (*str++);
+    return NULL;
 }
 
 /*********************************************************************




More information about the wine-cvs mailing list