Piotr Caban : msvcrt: Copy strchr implementation from ntdll.

Alexandre Julliard julliard at winehq.org
Wed Jul 22 16:34:29 CDT 2020


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

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Wed Jul 22 11:10:33 2020 +0200

msvcrt: Copy strchr implementation from ntdll.

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

---

 dlls/msvcrt/string.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c
index fe86f14f57..4038ed41cd 100644
--- a/dlls/msvcrt/string.c
+++ b/dlls/msvcrt/string.c
@@ -2284,7 +2284,11 @@ void* __cdecl MSVCRT_memset(void *dst, int c, MSVCRT_size_t n)
  */
 char* __cdecl MSVCRT_strchr(const char *str, int c)
 {
-    return strchr(str, c);
+    do
+    {
+        if (*str == (char)c) return (char*)str;
+    } while (*str++);
+    return NULL;
 }
 
 /*********************************************************************




More information about the wine-cvs mailing list