From 2199cba0497e888b56a85d36d858cb69392eeb30 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 10 Sep 2023 15:12:26 +0200 Subject: [PATCH] Fix compile error. --- platform/windows/sub_process_windows.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/platform/windows/sub_process_windows.cpp b/platform/windows/sub_process_windows.cpp index 27f112ab6..8a967a416 100644 --- a/platform/windows/sub_process_windows.cpp +++ b/platform/windows/sub_process_windows.cpp @@ -53,10 +53,8 @@ Error SubProcessWindows::start() { String path = _executable_path.replace("/", "\\"); String cmdline = _quote_command_line_argument(path); - const List::Element *I = _arguments.front(); - while (I) { - cmdline += " " + _quote_command_line_argument(I->get()); - I = I->next(); + for (int i = 0; i < _arguments.size(); ++i) { + cmdline += " " + _quote_command_line_argument(_arguments[i]); } ZeroMemory(&_process_info.si, sizeof(_process_info.si)); @@ -324,7 +322,6 @@ void SubProcessWindows::_append_to_pipe(char *p_bytes, int p_size) { SubProcessWindows::SubProcessWindows() : SubProcess() { - _pipe_handles[0] = NULL; _pipe_handles[1] = NULL;