CTM: check for finite value aswell (#11185)
checking for < 0.F will not catch NaN or inf values, use std::isfinite aswell.
This commit is contained in:
parent
fdbbad04bb
commit
6ca7c14b58
1 changed files with 2 additions and 2 deletions
|
|
@ -34,8 +34,8 @@ CHyprlandCTMControlResource::CHyprlandCTMControlResource(UP<CHyprlandCtmControlM
|
|||
wl_fixed_to_double(mat5), wl_fixed_to_double(mat6), wl_fixed_to_double(mat7), wl_fixed_to_double(mat8)};
|
||||
|
||||
for (auto& el : MAT) {
|
||||
if (el < 0.F) {
|
||||
m_resource->error(HYPRLAND_CTM_CONTROL_MANAGER_V1_ERROR_INVALID_MATRIX, "a matrix component was < 0");
|
||||
if (!std::isfinite(el) || el < 0.F) {
|
||||
m_resource->error(HYPRLAND_CTM_CONTROL_MANAGER_V1_ERROR_INVALID_MATRIX, "a matrix component was invalid");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue