Commit dea850cf authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

regsvr32: Use wide-char string literals.

parent 1cba8c3f
...@@ -114,9 +114,7 @@ static LPCWSTR find_arg_start(LPCWSTR cmdline) ...@@ -114,9 +114,7 @@ static LPCWSTR find_arg_start(LPCWSTR cmdline)
static void reexec_self(void) static void reexec_self(void)
{ {
/* restart current process as 32-bit or 64-bit with same command line */ /* 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 #ifndef _WIN64
static const WCHAR sysnative[] = {'\\','S','y','s','N','a','t','i','v','e',0};
BOOL wow64; BOOL wow64;
#endif #endif
WCHAR systemdir[MAX_PATH]; WCHAR systemdir[MAX_PATH];
...@@ -138,16 +136,16 @@ static void reexec_self(void) ...@@ -138,16 +136,16 @@ static void reexec_self(void)
} }
GetWindowsDirectoryW(systemdir, MAX_PATH); GetWindowsDirectoryW(systemdir, MAX_PATH);
wcscat(systemdir, sysnative); wcscat(systemdir, L"\\SysNative");
#endif #endif
args = find_arg_start(GetCommandLineW()); args = find_arg_start(GetCommandLineW());
cmdline = HeapAlloc(GetProcessHeap(), 0, 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); wcscpy(cmdline, systemdir);
wcscat(cmdline, exe_name); wcscat(cmdline, L"\\regsvr32.exe");
wcscat(cmdline, args); wcscat(cmdline, args);
si.cb = sizeof(si); si.cb = sizeof(si);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment