Incorporating change from #1568 and the other fix needed.

This commit is contained in:
Christoffer Lerno
2024-10-23 23:48:27 +02:00
parent f02387073d
commit d8f4da4d90

View File

@@ -1145,7 +1145,7 @@ static void execute_scripts(void)
}
scratch_buffer_clear();
scratch_buffer_append_len(call.ptr, call.len);
(void) compile_and_invoke(scratch_buffer_to_string(), execs.len ? execs.ptr : "", NULL);
(void) compile_and_invoke(scratch_buffer_copy(), execs.len ? execs.ptr : "", NULL);
}
dir_change(old_path);
free(old_path);
@@ -1524,6 +1524,7 @@ File *compile_and_invoke(const char *file, const char *args, const char *stdin_d
}
const char *compiler_path = file_append_path(find_executable_path(), name);
scratch_buffer_clear();
if (PLATFORM_WINDOWS) scratch_buffer_append_char('"');
scratch_buffer_append_native_safe_path(compiler_path, strlen(compiler_path));
const char *output = "__c3exec__";