Commit 279bcb69caf5912de76220723a49316ac54d8625

Con Kolivas 2014-02-21T12:04:49

Check for error from setfloatval

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/cgminer.c b/cgminer.c
index 7165896..15d67a9 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -1082,6 +1082,9 @@ static char *set_float_125_to_500(const char *arg, float *i)
 {
 	char *err = opt_set_floatval(arg, i);
 
+	if (err)
+		return err;
+
 	if (*i < 125 || *i > 500)
 		return "Value out of range";