From: Kevin Day Date: Sun, 25 Feb 2024 17:47:36 +0000 (-0600) Subject: Bugfix: Incorrect mode when featureless make is building settings. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=a7de4cc01dc6c4638ffb9a36514df1b177d50fb6;p=fll Bugfix: Incorrect mode when featureless make is building settings. This is a forward port of commit e70ac676f1907f17bcf24e428008183b8ccb96f5 from the 0.6 branch. In the 0.6, this problem happens only on printing. In this branch, the 0.7 development branch, this is used in different parts of the code and may have unintended functional consequences. Oddly, this problem is not observed for the same files that the problem can be seen when using the 0.6 branch built programs. I have opted to fix the problem rather than to investigate further. The logic is clearly flawed and the fix is identical from the 0.6 branch. --- diff --git a/level_3/fake/c/main/build/load.c b/level_3/fake/c/main/build/load.c index f86ff58..d0e67d4 100644 --- a/level_3/fake/c/main/build/load.c +++ b/level_3/fake/c/main/build/load.c @@ -77,9 +77,6 @@ extern "C" { if (build_arguments->used > 1) { modes_custom.used = build_arguments->used - 1; } - else if (main->setting.modes.used) { - modes_custom.used = main->setting.modes.used; - } } f_string_static_t modes_custom_array[modes_custom.used]; @@ -93,11 +90,6 @@ extern "C" { modes_custom.array[i] = build_arguments->array[i + 1]; } // for } - else if (main->setting.modes.used) { - for (; i < main->setting.modes.used; ++i) { - modes_custom.array[i] = main->setting.modes.array[i]; - } // for - } } f_string_static_t path_file = f_string_static_t_initialize;