Browse Source

pick_unit: Avoid infinite loop when passed inf float

Luke Dashjr 11 years ago
parent
commit
cf07535d5c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      miner.c

+ 1 - 1
miner.c

@@ -2785,7 +2785,7 @@ void pick_unit(float hashrate, unsigned char *unit)
 {
 	unsigned char i;
 	
-	if (hashrate == 0)
+	if (hashrate == 0 || !isfinite(hashrate))
 	{
 		if (*unit < _unitbase)
 			*unit = _unitbase;