Pass in variables as intended to CreateProcessW().

This commit is contained in:
Relintai 2023-08-05 20:24:32 +02:00
parent 5d60b3af04
commit c4e76950fa

View File

@ -2872,7 +2872,7 @@ Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments,
creaton_flags |= CREATE_NO_WINDOW;
}
int ret = CreateProcessW(nullptr, (LPWSTR)(modstr.ptrw()), nullptr, nullptr, 0, NORMAL_PRIORITY_CLASS & CREATE_NO_WINDOW, nullptr, nullptr, si_w, &pi.pi);
int ret = CreateProcessW(nullptr, (LPWSTR)(modstr.ptrw()), nullptr, nullptr, inherit_handles, creaton_flags, nullptr, nullptr, si_w, &pi.pi);
if (!ret && r_pipe) {
CloseHandle(pipe[0]); // Cleanup pipe handles.
CloseHandle(pipe[1]);