From: Kevin Day Date: Wed, 29 Sep 2021 23:28:57 +0000 (-0500) Subject: Bugfix: Running as init is still not handling interruptable correctly. X-Git-Tag: 0.5.6~31 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=df1f14e1b80a06d41ac2cbbfe651978eb7702f0c;p=fll Bugfix: Running as init is still not handling interruptable correctly. 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. --- diff --git a/level_3/controller/c/controller.c b/level_3/controller/c/controller.c index 8d46b61..6802de0 100644 --- a/level_3/controller/c/controller.c +++ b/level_3/controller/c/controller.c @@ -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; } }