mirror of
https://github.com/onyx-and-iris/vmrcli.git
synced 2024-11-15 17:40:56 +00:00
protect against unsafe gain changes
This commit is contained in:
parent
adaf3a7837
commit
815a19210b
@ -240,7 +240,10 @@ void parse_command(T_VBVMR_INTERFACE *vmr, char *command)
|
|||||||
get(vmr, command, &res);
|
get(vmr, command, &res);
|
||||||
if (res.type == FLOAT_T)
|
if (res.type == FLOAT_T)
|
||||||
{
|
{
|
||||||
set_parameter_float(vmr, command, 1 - res.val.f);
|
if (res.val.f == 1 || res.val.f == 0)
|
||||||
|
set_parameter_float(vmr, command, 1 - res.val.f);
|
||||||
|
else
|
||||||
|
log_warn("%s does not appear to be a boolean parameter", command);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user