Skip to content

Commit

Permalink
Fixed a math issue when reporting fan speed on the status line.
Browse files Browse the repository at this point in the history
  • Loading branch information
LiveJay committed Nov 9, 2013
1 parent be8b4f9 commit 0124217
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion driver-klondike.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0124217

Please sign in to comment.