Clamp initial hfa fanspeed to min/max if passed as parameters.
diff --git a/driver-hashfast.c b/driver-hashfast.c
index afd8f65..58a06fd 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -52,6 +52,10 @@ char *set_hfa_fan(char *arg)
opt_hfa_fan_min = val1;
opt_hfa_fan_max = val2;
+ if (opt_hfa_fan_min > opt_hfa_fan_default)
+ opt_hfa_fan_default = opt_hfa_fan_min;
+ if (opt_hfa_fan_max < opt_hfa_fan_default)
+ opt_hfa_fan_default = opt_hfa_fan_max;
return NULL;
}