Browse Source

Merge commit '51f5b97' into cg_merges_20131108a

Luke Dashjr 12 years ago
parent
commit
3e3a0380a0
1 changed files with 2 additions and 1 deletions
  1. 2 1
      driver-klondike.c

+ 2 - 1
driver-klondike.c

@@ -1536,7 +1536,8 @@ static void get_klondike_statline_before(char *buf, size_t siz, struct cgpu_info
 	}
 	}
 	rd_unlock(&(klninfo->stat_lock));
 	rd_unlock(&(klninfo->stat_lock));
 	fan /= slaves + 1;
 	fan /= slaves + 1;
-	fan *= 100/255;
+	//fan *= 100/255; // <-- You can't do this because int 100 / int 255 == 0
+        fan = 100 * fan / 255;
 	if (fan > 99) // short on screen space
 	if (fan > 99) // short on screen space
 		fan = 99;
 		fan = 99;
 	clock /= slaves + 1;
 	clock /= slaves + 1;