From 99dd6ce77f0cb9ec4ac26e348127fd18b8303db3 Mon Sep 17 00:00:00 2001 From: Armas Spann Date: Tue, 5 Apr 2022 23:33:43 +0200 Subject: [PATCH] fix for #176 - fancurve percentage check not handled correctly --- rog-profiles/src/fan_curve_set.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rog-profiles/src/fan_curve_set.rs b/rog-profiles/src/fan_curve_set.rs index 3d6e97f2..830c3d4a 100644 --- a/rog-profiles/src/fan_curve_set.rs +++ b/rog-profiles/src/fan_curve_set.rs @@ -72,7 +72,7 @@ impl std::str::FromStr for CurveData { let mut p = r; if percentages { p *= 255 / 100; - if p > 100 { + if r > 100 { return Err(ProfileError::ParseFanCurvePercentOver100(r)); } }