Crash when attempting to set specific fan curve
Tested on release version 1.1.1, Fedora 34.
Steps to reproduce:
- Create a fan curve with a point for a lower temperature set to a higher fan speed than the next higher temperature point, like this:
- Click "Apply".
An assertion fails:
/usr/include/c++/11/bits/stl_algo.h:3658: constexpr const _Tp& std::clamp(const _Tp&, const _Tp&, const _Tp&) [with _Tp = units::unit_t<units::unit<std::ratio<1, 100>, units::base_unit<> > >]: Assertion '!(__hi < __lo)' failed.
and then the app crashes.
I can see two solutions:
- The GUI should disallow a point in the curve to be placed like this.
- The app should allow this, and not crash on apply.