From 9b4b36234d6a0b8c41f6f4237611f461f3209957 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Thu, 25 Jul 2024 19:11:44 -0500 Subject: [PATCH] Regression: Incorrect invalid parameter error when -s/--settings and similar parameters are correctly passed. During migration I forgot to add the if conditions before throwing the error. --- sources/c/program/controller/main/common.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sources/c/program/controller/main/common.c b/sources/c/program/controller/main/common.c index d1c2f1e..d06449e 100644 --- a/sources/c/program/controller/main/common.c +++ b/sources/c/program/controller/main/common.c @@ -165,9 +165,13 @@ extern "C" { for (index = 0; index < 4; ++index) { if (main->program.parameters.array[codes[index]].result & f_console_result_found_e) { - main->setting.state.status = F_status_set_error(F_parameter); + if (main->program.parameters.array[codes[index]].locations.used != main->program.parameters.array[codes[index]].values.used) { + main->setting.state.status = F_status_set_error(F_parameter); - fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, strings[index]); + fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, strings[index]); + + continue; + } } else if (main->program.parameters.array[codes[index]].result & f_console_result_value_e) { if (flags[index]) main->setting.flag |= flags[index]; -- 1.8.3.1