mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:47:46 +00: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; }
|
ParameterFixedPoint default_value() const { return m_default_value; }
|
||||||
void set_value(ParameterFixedPoint value)
|
void set_value(ParameterFixedPoint value)
|
||||||
{
|
{
|
||||||
VERIFY(value <= m_max_value && value >= m_min_value);
|
Detail::ProcessorParameterSingleValue<ParameterFixedPoint>::set_value(value.clamp(min_value(), max_value()));
|
||||||
Detail::ProcessorParameterSingleValue<ParameterFixedPoint>::set_value(value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue