[PATCH] netapi32: Return the length in characters not bytes.

Huw Davies huw at codeweavers.com
Thu Dec 2 01:46:17 CST 2021


Signed-off-by: Huw Davies <huw at codeweavers.com>
---
 dlls/netapi32/unixlib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/netapi32/unixlib.c b/dlls/netapi32/unixlib.c
index 23881b470d9..c6b389950f7 100644
--- a/dlls/netapi32/unixlib.c
+++ b/dlls/netapi32/unixlib.c
@@ -72,7 +72,7 @@ static DWORD netapi_wcstoumbs( const WCHAR *src, char *dst, DWORD dstlen )
 
 static DWORD netapi_umbstowcs( const char *src, WCHAR *dst, DWORD dstlen )
 {
-    if (!dst) return (strlen( src ) + 1) * sizeof(WCHAR);
+    if (!dst) return strlen( src ) + 1;
     return ntdll_umbstowcs( src, strlen( src ) + 1, dst, dstlen );
 }
 
-- 
2.23.0




More information about the wine-devel mailing list