]> Kevux Git Server - fll/commitdiff
Bugfix: The build settings 'path_sources' is incorrectly added.
authorKevin Day <kevin@kevux.org>
Sun, 29 Jan 2023 23:36:06 +0000 (17:36 -0600)
committerKevin Day <kevin@kevux.org>
Sun, 29 Jan 2023 23:36:06 +0000 (17:36 -0600)
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/main/private-build-load.c
level_3/fake/c/main/private-build.c

index 8c388479b41bac62286f69b3046c92d302f0c851..302b2c1f37d7b905f027cc1da78998b190e62227 100644 (file)
@@ -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));
index 37de206d368a9e817a6a09d62b95ef620d698139..be1a25cc5317d6b738c5e89aea6eca2f782af15c 100644 (file)
@@ -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;