Commit 0124217db80cd4506d4fe1c921a6fd49bba59efb

Jay Herrick 2013-11-09T09:56:54

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;