summaryrefslogtreecommitdiff
path: root/src/protocols/CTMControl.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2025-07-23 12:09:19 +0200
committerGitHub <noreply@github.com>2025-07-23 12:09:19 +0200
commit6ca7c14b581a0067fc5c42ec4eb7a2d7b827ad0f (patch)
tree287b21b1accdff23a2489d4ea943f4a94c0e8988 /src/protocols/CTMControl.cpp
parentfdbbad04bbf2382e9a980418c976668fc062f195 (diff)
CTM: check for finite value aswell (#11185)
checking for < 0.F will not catch NaN or inf values, use std::isfinite aswell.
Diffstat (limited to 'src/protocols/CTMControl.cpp')
-rw-r--r--src/protocols/CTMControl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/protocols/CTMControl.cpp b/src/protocols/CTMControl.cpp
index c9e9d098..38145ab1 100644
--- a/src/protocols/CTMControl.cpp
+++ b/src/protocols/CTMControl.cpp
@@ -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;
}
}