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

index 31db7045032f227abc88e9494b65b99f39086b78..838be81e6875575a1d1520880a6d187bb3f23d0f 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->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);
index fe0679b534cd4d6944ce1f9c267771b3b4ab97fa..ba6a10ca47bf1d5aee7f304eb1ed00ca1c4b0d9e 100644 (file)
@@ -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;