Piotr Caban : msvcrt: Copy strlen implementation from ntdll.

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


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

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

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

diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c
index 4038ed41cd..f646cee9df 100644
--- a/dlls/msvcrt/string.c
+++ b/dlls/msvcrt/string.c
@@ -1266,7 +1266,9 @@ int CDECL __STRINGTOLD( MSVCRT__LDOUBLE *value, char **endptr, const char *str,
  */
 MSVCRT_size_t __cdecl MSVCRT_strlen(const char *str)
 {
-    return strlen(str);
+    const char *s = str;
+    while (*s) s++;
+    return s - str;
 }
 
 /******************************************************************




More information about the wine-cvs mailing list