From 91f8ca080882cec79a5bb6f050277bdeef6e850e Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 5 Apr 2023 20:47:19 -0500 Subject: [PATCH] Bugfix: The stage files should not begin with "-". 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/private-build-load.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/level_3/fake/c/private-build-load.c b/level_3/fake/c/private-build-load.c index e0b09f2..7f603f7 100644 --- a/level_3/fake/c/private-build-load.c +++ b/level_3/fake/c/private-build-load.c @@ -1551,22 +1551,24 @@ extern "C" { for (uint8_t i = 0; i < fake_build_stage_total_d; ++i) { + values[i]->used = 0; + *status = f_string_dynamic_append_nulless(data->path_build_stage, values[i]); if (F_status_is_error_not(*status) && data->process.used) { *status = f_string_dynamic_append_nulless(data->process, values[i]); - } - if (F_status_is_error_not(*status)) { - *status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]); + if (F_status_is_error_not(*status)) { + *status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]); + } } - if (F_status_is_error_not(*status)) { + if (F_status_is_error_not(*status) && names[i].used) { *status = f_string_dynamic_append_nulless(names[i], values[i]); - } - if (F_status_is_error_not(*status)) { - *status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]); + if (F_status_is_error_not(*status)) { + *status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]); + } } if (F_status_is_error_not(*status)) { -- 1.8.3.1