summaryrefslogtreecommitdiff
path: root/wmiistatus.c
diff options
context:
space:
mode:
authorMichael Stapelberg <michael+x200@stapelberg.de>2009-04-09 19:11:07 +0200
committerMichael Stapelberg <michael+x200@stapelberg.de>2009-04-09 19:11:07 +0200
commit02b4992e9d3b63bd5eb397d7bbed9936bd2004c4 (patch)
tree9161b4a4d77c9e59ac366d834a9b3e0544dc56bb /wmiistatus.c
parent444516794e27da249f81790f9f280b0912004c19 (diff)
Bugfix: Check if the present rate is > 0, not only if it is not set
Diffstat (limited to 'wmiistatus.c')
-rw-r--r--wmiistatus.c2
1 files changed, 1 insertions, 1 deletions
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)