From 688318261cf331979e28c87f393bb4f9d8bf1985 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Thu, 19 Nov 2020 23:03:02 +0100 Subject: [PATCH] itss: Use zero terminated WCHAR strings. Signed-off-by: Michael Stefaniuc Signed-off-by: Alexandre Julliard --- dlls/itss/protocol.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/itss/protocol.c b/dlls/itss/protocol.c index 167ce906b90..6d40ddf738f 100644 --- a/dlls/itss/protocol.c +++ b/dlls/itss/protocol.c @@ -148,16 +148,16 @@ static ULONG WINAPI ITSInternetProtocol_Release(IInternetProtocol *iface) static LPCWSTR skip_schema(LPCWSTR url) { - static const WCHAR its_schema[] = {'i','t','s',':'}; - static const WCHAR msits_schema[] = {'m','s','-','i','t','s',':'}; - static const WCHAR mk_schema[] = {'m','k',':','@','M','S','I','T','S','t','o','r','e',':'}; + static const WCHAR its_schema[] = L"its:"; + static const WCHAR msits_schema[] = L"ms-its:"; + static const WCHAR mk_schema[] = L"mk:@MSITStore:"; - if(!wcsnicmp(its_schema, url, ARRAY_SIZE(its_schema))) - return url + ARRAY_SIZE(its_schema); - if(!wcsnicmp(msits_schema, url, ARRAY_SIZE(msits_schema))) - return url + ARRAY_SIZE(msits_schema); - if(!wcsnicmp(mk_schema, url, ARRAY_SIZE(mk_schema))) - return url + ARRAY_SIZE(mk_schema); + if(!wcsnicmp(its_schema, url, ARRAY_SIZE(its_schema) - 1)) + return url + ARRAY_SIZE(its_schema) - 1; + if(!wcsnicmp(msits_schema, url, ARRAY_SIZE(msits_schema) - 1)) + return url + ARRAY_SIZE(msits_schema) - 1; + if(!wcsnicmp(mk_schema, url, ARRAY_SIZE(mk_schema) - 1)) + return url + ARRAY_SIZE(mk_schema) - 1; return NULL; }