Fix incorrect CreateProcessW call

Quoth MSDN: "The Unicode version of this function, CreateProcessW, can
modify the contents of this string. Therefore, this parameter cannot be
a pointer to read-only memory (such as a const variable or a literal
string). If this parameter is a constant string, the function may cause
an access violation."

It can, however, be NULL, which does the right thing automatically.
liquid_container
Nicolas Hake 2016-02-08 16:38:15 +01:00
parent 64a5388d4d
commit 3d9b322f51
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ static INT_PTR CALLBACK GfxErrProcedure(HWND hWnd, UINT Msg, WPARAM wParam, LPAR
memset(&siStartupInfo, 0, sizeof(siStartupInfo));
memset(&piProcessInfo, 0, sizeof(piProcessInfo));
siStartupInfo.cb = sizeof(siStartupInfo);
CreateProcessW(selfpath, L"",
CreateProcessW(selfpath, NULL,
NULL, NULL, FALSE, 0, NULL, Config.General.ExePath.GetWideChar(), &siStartupInfo, &piProcessInfo);
EndDialog(hWnd,2);
return TRUE;