From: Kevin Day Date: Sun, 29 Jan 2023 23:36:06 +0000 (-0600) Subject: Bugfix: The build settings 'path_sources' is incorrectly added. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=ebf45163699764860892a170ac3c693e26134002;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/main/private-build-load.c b/level_3/fake/c/main/private-build-load.c index 8c38847..302b2c1 100644 --- a/level_3/fake/c/main/private-build-load.c +++ b/level_3/fake/c/main/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->setting->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_sources_e].result & f_console_result_value_e && data->setting->sources.used) { - *status = f_string_dynamic_append_assure(f_path_separator_s, &data->setting->sources); + if (data->main->parameters.array[fake_parameter_sources_e].result & f_console_result_value_e && setting->path_sources.used) { + *status = f_string_dynamic_append_assure(f_path_separator_s, &setting->path_sources); if (F_status_is_error(*status)) { fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_append_assure)); diff --git a/level_3/fake/c/main/private-build.c b/level_3/fake/c/main/private-build.c index 37de206..be1a25c 100644 --- a/level_3/fake/c/main/private-build.c +++ b/level_3/fake/c/main/private-build.c @@ -665,7 +665,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static data->setting->licenses, data->setting->process, data->setting->settings, - data->setting->sources, + data_build->setting.path_sources, data->setting->work, }; @@ -988,7 +988,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->setting->sources.used; + source->used = 0; if (setting_path_source->used) { source->used += setting_path_source->used; @@ -1015,9 +1015,6 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static source->used = 0; - memcpy(source->string, data->setting->sources.string, sizeof(f_char_t) * data->setting->sources.used); - source->used += data->setting->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;