Skip to content

Commit

Permalink
protect against unsafe gain changes
Browse files Browse the repository at this point in the history
  • Loading branch information
onyx-and-iris committed Jul 1, 2024
1 parent adaf3a7 commit 815a192
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vmrcli.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,10 @@ void parse_command(T_VBVMR_INTERFACE *vmr, char *command)
get(vmr, command, &res);
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;
}
Expand Down

0 comments on commit 815a192

Please sign in to comment.