]> Kevux Git Server - fll/commitdiff
Bugfix: The stage files should not begin with "-".
authorKevin Day <kevin@kevux.org>
Thu, 6 Apr 2023 01:33:33 +0000 (20:33 -0500)
committerKevin Day <kevin@kevux.org>
Thu, 6 Apr 2023 01:33:33 +0000 (20:33 -0500)
I haven't looked at the stage files in a while because it just works.
I happened to notice that they are beginning with "-".
This is incorrect.

Turns out that at some point in time the separator got pulled outside the process.used condition.
This results in the "-" always being added when it should not be.
The problem is introduced in this completely erroneous commit 8cb1d765b75403e242e307590842628aad7ad91b.

Add the same logic check to the name because it also append a "-".

Also reset the used length at the start of population of the stage file strings.

level_3/fake/c/main/build/load.c

index b20ecdc31ed5b94f479544cc331684c491b1db3a..38eb9560a7aee09cb2b1f6a72cd9c85afe06a881 100644 (file)
@@ -1380,22 +1380,24 @@ extern "C" {
 
     for (uint8_t i = 0; i < fake_build_stage_total_d; ++i) {
 
+      values[i]->used = 0;
+
       main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_stage, values[i]);
 
       if (F_status_is_error_not(main->setting.state.status) && main->setting.process.used) {
         main->setting.state.status = f_string_dynamic_append_nulless(main->setting.process, values[i]);
-      }
 
-      if (F_status_is_error_not(main->setting.state.status)) {
-        main->setting.state.status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]);
+        if (F_status_is_error_not(main->setting.state.status)) {
+          main->setting.state.status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]);
+        }
       }
 
-      if (F_status_is_error_not(main->setting.state.status)) {
+      if (F_status_is_error_not(main->setting.state.status) && names[i].used) {
         main->setting.state.status = f_string_dynamic_append_nulless(names[i], values[i]);
-      }
 
-      if (F_status_is_error_not(main->setting.state.status)) {
-        main->setting.state.status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]);
+        if (F_status_is_error_not(main->setting.state.status)) {
+          main->setting.state.status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]);
+        }
       }
 
       if (F_status_is_error_not(main->setting.state.status)) {