From 4028de8c55c7f590a6a04c6ae120012e158d6e3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Thu, 11 Jul 2024 17:58:00 +0200 Subject: [PATCH] [APPHELP] SdbGUIDToString(): use sizeof(WCHAR) instead of '2' (#7137) --- dll/appcompat/apphelp/sdbapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/appcompat/apphelp/sdbapi.c b/dll/appcompat/apphelp/sdbapi.c index 5ddf98938ca..28762d71ca0 100644 --- a/dll/appcompat/apphelp/sdbapi.c +++ b/dll/appcompat/apphelp/sdbapi.c @@ -414,7 +414,7 @@ BOOL WINAPI SdbGUIDToString(CONST GUID *Guid, PWSTR GuidString, SIZE_T Length) UNICODE_STRING GuidString_u; if (NT_SUCCESS(RtlStringFromGUID(Guid, &GuidString_u))) { - HRESULT hr = StringCchCopyNW(GuidString, Length, GuidString_u.Buffer, GuidString_u.Length / 2); + HRESULT hr = StringCchCopyNW(GuidString, Length, GuidString_u.Buffer, GuidString_u.Length / sizeof(WCHAR)); RtlFreeUnicodeString(&GuidString_u); return SUCCEEDED(hr); }