Piotr Caban : msvcrt: Copy strpbrk implementation from ntdll.

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


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

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

msvcrt: Copy strpbrk 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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c
index 9e747a1a0c..3a6e6b668c 100644
--- a/dlls/msvcrt/string.c
+++ b/dlls/msvcrt/string.c
@@ -2505,7 +2505,8 @@ MSVCRT_size_t __cdecl MSVCRT_strcspn(const char *str, const char *reject)
  */
 char* __cdecl MSVCRT_strpbrk(const char *str, const char *accept)
 {
-    return strpbrk(str, accept);
+    for (; *str; str++) if (strchr( accept, *str )) return (char*)str;
+    return NULL;
 }
 
 /*********************************************************************




More information about the wine-cvs mailing list