From: Kevin Day Date: Sun, 29 Jan 2023 23:27:21 +0000 (-0600) Subject: Bugfix: The build settings 'path_sources' is incorrectly added. X-Git-Tag: 0.6.4~64 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=f3c1561cbffa40063f1bef9ff480ba34381838e9;p=fll 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'. --- 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;