Ported from Godot4: Fix Windows execute exit code.

- bruvzg
94355249c3
This commit is contained in:
Relintai 2023-08-05 20:18:32 +02:00
parent b4fe2b0d38
commit 5d60b3af04

View File

@ -2921,9 +2921,9 @@ Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments,
}
CloseHandle(pipe[0]); // Close pipe read handle.
} else {
WaitForSingleObject(pi.pi.hProcess, INFINITE);
}
WaitForSingleObject(pi.pi.hProcess, INFINITE);
if (r_exitcode) {
DWORD ret2;