summaryrefslogtreecommitdiff
path: root/src/modules/rkt
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-08-03 17:02:57 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-08-03 17:02:57 -0700
commitf2ad42777ddf96038e08a29cce81acc1b426ae1e (patch)
tree16ccbad5878899644449f93ed39b137b4d948485 /src/modules/rkt
parent595d5e8b54dde06d7f624d4e64458a2648477669 (diff)
til_settings: honor til_setting_t.nocheck in spec_check
Trivial refactor s/til_setting_spec_check/til_setting_check_spec/ so it operates on a til_setting_t as opposed to the bare value. With the containing til_setting_t onhand it can be responsible for bypassing the check when til_setting_t.nocheck is set. Adjusted callers in setup_interactively() and rkt_scener_update() accordingly.
Diffstat (limited to 'src/modules/rkt')
-rw-r--r--src/modules/rkt/rkt_scener.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/rkt/rkt_scener.c b/src/modules/rkt/rkt_scener.c
index 25650c8..c491531 100644
--- a/src/modules/rkt/rkt_scener.c
+++ b/src/modules/rkt/rkt_scener.c
@@ -1061,8 +1061,8 @@ int rkt_scener_update(rkt_context_t *ctxt)
}
}
- if (!setting->nocheck && til_setting_spec_check(&desc->spec, setting->value) < 0) {
- /* setting invalid! go back to prompting for input */
+ r = til_setting_check_spec(setting, &desc->spec);
+ if (r < 0) { /* setting invalid! go back to prompting for input */
scener->new_scene.cur_invalid = setting;
return rkt_scener_send_error(scener, EINVAL, RKT_SCENER_FSM_SEND_NEWSCENE_SETUP_PROMPT);
© All Rights Reserved