mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-23 21:14:18 +00:00
Add check to 'i' (could be considered safer)
This commit is contained in:
parent
407be57400
commit
4d3cc0bc6d
@ -2623,7 +2623,7 @@ void write_config(FILE *fcfg)
|
|||||||
|
|
||||||
/* Write pool values in priority order */
|
/* Write pool values in priority order */
|
||||||
fputs("{\n\"pools\" : [", fcfg);
|
fputs("{\n\"pools\" : [", fcfg);
|
||||||
while(j < total_pools) {
|
while((j < total_pools) && (i < total_pools)) {
|
||||||
if(pools[i]->prio == j) {
|
if(pools[i]->prio == j) {
|
||||||
fprintf(fcfg, "%s\n\t{\n\t\t\"url\" : \"%s\",", i > 0 ? "," : "", pools[i]->rpc_url);
|
fprintf(fcfg, "%s\n\t{\n\t\t\"url\" : \"%s\",", i > 0 ? "," : "", pools[i]->rpc_url);
|
||||||
fprintf(fcfg, "\n\t\t\"user\" : \"%s\",", pools[i]->rpc_user);
|
fprintf(fcfg, "\n\t\t\"user\" : \"%s\",", pools[i]->rpc_user);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user