From de2d42b8c35ee0430f461a02e0980bcaa78185fe Mon Sep 17 00:00:00 2001 From: Lev Babiev Date: Fri, 20 Dec 2024 08:20:13 +0000 Subject: [PATCH] actionlib: fixf flow control issue in setbarvisibility --- src/actionlib.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/actionlib.c b/src/actionlib.c index 2ba98aa..206b702 100644 --- a/src/actionlib.c +++ b/src/actionlib.c @@ -288,9 +288,8 @@ static value_t action_setbarvisibility ( vm_t *vm, value_t p[], gint np ) vm_param_check_np_range(vm, np, 1, 2, "SetBarVisibility"); vm_param_check_string(vm, p, np-1, "SetBarVisibility"); - if( np==2) - bar_set_visibility((np==2)? bar_from_name(value_get_string(p[0])) : NULL, - NULL, *p[np-1].value.string); + bar_set_visibility((np==2)? bar_from_name(value_get_string(p[0])) : NULL, + NULL, *value_get_string(p[np-1])); return value_na; }