From 770d3b8623c008c68c0751c442cd1ea26c01bd2a Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Wed, 22 Jul 2020 11:10:40 +0200 Subject: [PATCH] msvcrt: Copy strlen implementation from ntdll. Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- 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 4038ed41cdc..f646cee9dfd 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; } /******************************************************************