From: Michael Stapelberg Date: Thu, 9 Apr 2009 17:11:07 +0000 (+0200) Subject: Bugfix: Check if the present rate is > 0, not only if it is not set X-Git-Tag: 1.0~16 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=02b4992e9d3b63bd5eb397d7bbed9936bd2004c4;p=i3%2Fi3status Bugfix: Check if the present rate is > 0, not only if it is not set --- diff --git a/wmiistatus.c b/wmiistatus.c index e1f1e68..cba4d8b 100644 --- a/wmiistatus.c +++ b/wmiistatus.c @@ -307,7 +307,7 @@ static char *get_battery_info() { last = walk+1; (void)close(fd); - if ((full_design != -1) && (remaining != -1) && (present_rate != -1)) { + if ((full_design != -1) && (remaining != -1) && (present_rate > 0)) { float remaining_time; int seconds, hours, minutes; if (status == CS_CHARGING)