Commit 51f5b97e09980fb45074c50fe7794ff44cf5cb6b

kanoi 2013-11-09T15:47:25

Merge pull request #517 from LiveJay/master Fixed a math issue when reporting fan speed on the status line.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/driver-klondike.c b/driver-klondike.c
index a445bf4..2446202 100644
--- a/driver-klondike.c
+++ b/driver-klondike.c
@@ -1432,7 +1432,8 @@ static void get_klondike_statline_before(char *buf, size_t siz, struct cgpu_info
 	}
 	rd_unlock(&(klninfo->stat_lock));
 	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
 		fan = 99;
 	clock /= slaves + 1;