From: Kevin Day Date: Fri, 26 Jul 2024 00:11:44 +0000 (-0500) Subject: Regression: Incorrect invalid parameter error when -s/--settings and similar paramete... X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=9b4b36234d6a0b8c41f6f4237611f461f3209957;p=controller 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. --- 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];