From 948bb7b3087910f146b28fb553df3e524420d85d Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 5 Apr 2023 20:33:33 -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/main/build/load.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/level_3/fake/c/main/build/load.c b/level_3/fake/c/main/build/load.c index b20ecdc..38eb956 100644 --- a/level_3/fake/c/main/build/load.c +++ b/level_3/fake/c/main/build/load.c @@ -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)) { -- 1.8.3.1