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); }