From f3c1561cbffa40063f1bef9ff480ba34381838e9 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 29 Jan 2023 17:27:21 -0600 Subject: [PATCH] Bugfix: The build settings 'path_sources' is incorrectly added. The commit 79858cf386916fd25ccd3578797de53b16f5c446 fixed a problem with the sources path passed to the program. This revealed a bug where the build setting 'path_sources' is being added twice. This is probably why the previous bug was not noticed for so long. Make sure to apply the passed path sources parameter when the build settings does not have 'path_sources'. --- level_3/fake/c/private-build-load.c | 6 +++--- level_3/fake/c/private-build.c | 7 ++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/level_3/fake/c/private-build-load.c b/level_3/fake/c/private-build-load.c index 31db704..838be81 100644 --- a/level_3/fake/c/private-build-load.c +++ b/level_3/fake/c/private-build-load.c @@ -932,7 +932,7 @@ extern "C" { fake_path_part_script_s, // path_program_script fake_path_part_shared_s, // path_program_shared fake_path_part_static_s, // path_program_static - f_string_empty_s, // path_sources + data->path_sources, // path_sources f_string_empty_s, // path_sources_object f_string_empty_s, // preserve_path_headers f_string_empty_s, // process_post @@ -1371,8 +1371,8 @@ extern "C" { if (F_status_is_error(*status)) return; - if (data->main->parameters.array[fake_parameter_path_sources_e].result == f_console_result_additional_e && data->path_sources.used) { - *status = f_string_dynamic_append_assure(f_path_separator_s, &data->path_sources); + if (data->main->parameters.array[fake_parameter_path_sources_e].result == f_console_result_additional_e && setting->path_sources.used) { + *status = f_string_dynamic_append_assure(f_path_separator_s, &setting->path_sources); if (F_status_is_error(*status)) { fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_assure", F_true); diff --git a/level_3/fake/c/private-build.c b/level_3/fake/c/private-build.c index fe0679b..ba6a10c 100644 --- a/level_3/fake/c/private-build.c +++ b/level_3/fake/c/private-build.c @@ -665,7 +665,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static data->settings, data->path_build, data->path_data, - data->path_sources, + data_build->setting.path_sources, data->path_work, }; @@ -998,7 +998,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static #ifndef _di_fake_build_path_source_length_ void fake_build_path_source_length(fake_data_t * const data, fake_build_data_t * const data_build, f_string_static_t * const setting_path_source, f_string_static_t * const source) { - source->used = data->path_sources.used; + source->used = 0; if (setting_path_source->used) { source->used += setting_path_source->used; @@ -1025,9 +1025,6 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static source->used = 0; - memcpy(source->string, data->path_sources.string, sizeof(f_char_t) * data->path_sources.used); - source->used += data->path_sources.used; - memcpy(source->string + source->used, setting_path_source->string, sizeof(f_char_t) * setting_path_source->used); source->used += setting_path_source->used; -- 1.8.3.1