]> Kevux Git Server - fll/commitdiff
Bugfix: Running as init is still not handling interruptable correctly.
authorKevin Day <thekevinday@gmail.com>
Wed, 29 Sep 2021 23:28:57 +0000 (18:28 -0500)
committerKevin Day <thekevinday@gmail.com>
Wed, 29 Sep 2021 23:28:57 +0000 (18:28 -0500)
I overlooked that the result was comparing against f_console_result_none rather than f_console_result_found.
This messed up my previous attempt to fix this.

Change the behavior and also explicitly assign the else case.

level_3/controller/c/controller.c

index 8d46b618e96bc50b4538452c4ce38f6910c4484a..6802de0199a0c663794f790e11e48d4205346168 100644 (file)
@@ -338,12 +338,18 @@ extern "C" {
 
     // The interruptable default is dependent on the "as init" execution state.
     if (main->as_init) {
-      if (main->parameters[controller_parameter_uninterruptable].result == f_console_result_none) {
+      if (main->parameters[controller_parameter_interruptable].result == f_console_result_found) {
         setting.interruptable = F_true;
       }
+      else {
+        setting.interruptable = F_false;
+      }
     }
     else {
-      if (main->parameters[controller_parameter_interruptable].result == f_console_result_found) {
+      if (main->parameters[controller_parameter_uninterruptable].result == f_console_result_found) {
+        setting.interruptable = F_false;
+      }
+      else {
         setting.interruptable = F_true;
       }
     }