Browse Source

Merge branch 'bugfix_cfg_invgpuplat' into bfgminer

Luke Dashjr 13 years ago
parent
commit
b8a55e5acf
1 changed files with 3 additions and 1 deletions
  1. 3 1
      miner.c

+ 3 - 1
miner.c

@@ -3204,7 +3204,9 @@ void write_config(FILE *fcfg)
 			   ((void *)opt->cb_arg == (void *)set_int_0_to_9999 ||
 			   ((void *)opt->cb_arg == (void *)set_int_0_to_9999 ||
 			   (void *)opt->cb_arg == (void *)set_int_1_to_65535 ||
 			   (void *)opt->cb_arg == (void *)set_int_1_to_65535 ||
 			   (void *)opt->cb_arg == (void *)set_int_0_to_10 ||
 			   (void *)opt->cb_arg == (void *)set_int_0_to_10 ||
-			   (void *)opt->cb_arg == (void *)set_int_1_to_10) && opt->desc != opt_hidden)
+			   (void *)opt->cb_arg == (void *)set_int_1_to_10) &&
+			   opt->desc != opt_hidden &&
+			   0 <= *(int *)opt->u.arg)
 				fprintf(fcfg, ",\n\"%s\" : \"%d\"", p+2, *(int *)opt->u.arg);
 				fprintf(fcfg, ",\n\"%s\" : \"%d\"", p+2, *(int *)opt->u.arg);
 		}
 		}
 	}
 	}