mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
LibDSP: Don't crash on out-of-bounds parameter value
We can just clamp instead.
This commit is contained in:
parent
961e263129
commit
1c3050245e
1 changed files with 1 additions and 2 deletions
|
@ -137,8 +137,7 @@ public:
|
|||
ParameterFixedPoint default_value() const { return m_default_value; }
|
||||
void set_value(ParameterFixedPoint value)
|
||||
{
|
||||
VERIFY(value <= m_max_value && value >= m_min_value);
|
||||
Detail::ProcessorParameterSingleValue<ParameterFixedPoint>::set_value(value);
|
||||
Detail::ProcessorParameterSingleValue<ParameterFixedPoint>::set_value(value.clamp(min_value(), max_value()));
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Reference in a new issue