forked from Mirrors/openclonk
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
parent
64a5388d4d
commit
3d9b322f51
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue