From: Kevin Day Date: Thu, 6 Apr 2023 01:47:19 +0000 (-0500) Subject: Bugfix: The stage files should not begin with "-". X-Git-Tag: 0.6.5~16 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=91f8ca080882cec79a5bb6f050277bdeef6e850e;p=fll 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. --- 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)) {