Commit 54f54825039dc5f597f7fb10a2cb501daef751e4

Con Kolivas 2014-04-03T21:09:01

Fix parsing of config files failing on custom parsing

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/cgminer.c b/cgminer.c
index 373bd33..6c95744 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -1458,10 +1458,10 @@ static char *parse_config(json_t *config, bool fileconf)
 			if (!val)
 				continue;
 
-			if ((opt->type & OPT_HASARG) && json_is_string(val)) {
+			if ((opt->type & (OPT_HASARG | OPT_PROCESSARG)) && json_is_string(val)) {
 				err = opt->cb_arg(json_string_value(val),
 						  opt->u.arg);
-			} else if ((opt->type & OPT_HASARG) && json_is_array(val)) {
+			} else if ((opt->type & (OPT_HASARG | OPT_PROCESSARG)) && json_is_array(val)) {
 				int n, size = json_array_size(val);
 
 				for (n = 0; n < size && !err; n++) {