Michael Stefaniuc : appwiz.cpl: Use zero terminated wide-char strings.
Alexandre Julliard
julliard at winehq.org
Mon Nov 2 16:21:19 CST 2020
Module: wine
Branch: master
Commit: 7d26ac0119ac9ad4c3300ffe6f36da71b3851d0a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7d26ac0119ac9ad4c3300ffe6f36da71b3851d0a
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Sun Nov 1 23:31:59 2020 +0100
appwiz.cpl: Use zero terminated wide-char strings.
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/appwiz.cpl/addons.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/dlls/appwiz.cpl/addons.c b/dlls/appwiz.cpl/addons.c
index dd53d9e282e..67d61ea0d22 100644
--- a/dlls/appwiz.cpl/addons.c
+++ b/dlls/appwiz.cpl/addons.c
@@ -598,21 +598,18 @@ static IInternetBindInfo InstallCallbackBindInfo = { &InstallCallbackBindInfoVtb
static void append_url_params( WCHAR *url )
{
- static const WCHAR arch_formatW[] = {'?','a','r','c','h','='};
- static const WCHAR v_formatW[] = {'&','v','='};
- static const WCHAR winevW[] = {'&','w','i','n','e','v','='};
DWORD size = INTERNET_MAX_URL_LENGTH * sizeof(WCHAR);
DWORD len = lstrlenW(url);
- memcpy(url+len, arch_formatW, sizeof(arch_formatW));
- len += ARRAY_SIZE(arch_formatW);
+ lstrcpyW(url+len, L"?arch=");
+ len += lstrlenW(L"?arch=");
len += MultiByteToWideChar(CP_ACP, 0, GECKO_ARCH, sizeof(GECKO_ARCH),
url+len, size/sizeof(WCHAR)-len)-1;
- memcpy(url+len, v_formatW, sizeof(v_formatW));
- len += ARRAY_SIZE(v_formatW);
+ lstrcpyW(url+len, L"&v=");
+ len += lstrlenW(L"&v=");
len += MultiByteToWideChar(CP_ACP, 0, addon->version, -1, url+len, size/sizeof(WCHAR)-len)-1;
- memcpy(url+len, winevW, sizeof(winevW));
- len += ARRAY_SIZE(winevW);
+ lstrcpyW(url+len, L"&winev=");
+ len += lstrlenW(L"&winev=");
MultiByteToWideChar(CP_ACP, 0, wine_get_version(), -1, url+len, size/sizeof(WCHAR)-len);
}
More information about the wine-cvs
mailing list