From dea850cfd5387d9b2fffacb40544ae38296cba72 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Thu, 8 Oct 2020 12:16:09 +0200 Subject: [PATCH] regsvr32: Use wide-char string literals. Signed-off-by: Michael Stefaniuc Signed-off-by: Alexandre Julliard --- programs/regsvr32/regsvr32.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/programs/regsvr32/regsvr32.c b/programs/regsvr32/regsvr32.c index 730f1fef3dd..885f0ff7833 100644 --- a/programs/regsvr32/regsvr32.c +++ b/programs/regsvr32/regsvr32.c @@ -114,9 +114,7 @@ static LPCWSTR find_arg_start(LPCWSTR cmdline) static void reexec_self(void) { /* restart current process as 32-bit or 64-bit with same command line */ - static const WCHAR exe_name[] = {'\\','r','e','g','s','v','r','3','2','.','e','x','e',0}; #ifndef _WIN64 - static const WCHAR sysnative[] = {'\\','S','y','s','N','a','t','i','v','e',0}; BOOL wow64; #endif WCHAR systemdir[MAX_PATH]; @@ -138,16 +136,16 @@ static void reexec_self(void) } GetWindowsDirectoryW(systemdir, MAX_PATH); - wcscat(systemdir, sysnative); + wcscat(systemdir, L"\\SysNative"); #endif args = find_arg_start(GetCommandLineW()); cmdline = HeapAlloc(GetProcessHeap(), 0, - (wcslen(systemdir)+wcslen(exe_name)+wcslen(args)+1)*sizeof(WCHAR)); + (wcslen(systemdir)+wcslen(L"\\regsvr32.exe")+wcslen(args)+1)*sizeof(WCHAR)); wcscpy(cmdline, systemdir); - wcscat(cmdline, exe_name); + wcscat(cmdline, L"\\regsvr32.exe"); wcscat(cmdline, args); si.cb = sizeof(si);