]> Kevux Git Server - controller/commitdiff
Regression: Incorrect invalid parameter error when -s/--settings and similar paramete...
authorKevin Day <Kevin@kevux.org>
Fri, 26 Jul 2024 00:11:44 +0000 (19:11 -0500)
committerKevin Day <Kevin@kevux.org>
Fri, 26 Jul 2024 00:11:44 +0000 (19:11 -0500)
During migration I forgot to add the if conditions before throwing the error.

sources/c/program/controller/main/common.c

index d1c2f1e7d78c89f57418380f98ebd63f7f8aa234..d06449ec21815b701073e73fc3d8ac0754fb5843 100644 (file)
@@ -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];