Commit c93b1b4b authored by Juri Linkov's avatar Juri Linkov
Browse files

(battery-linux-proc-acpi): Check `capacity' for non-nil

before comparing with `low' and `warn'.
parent ba44fca9
......@@ -391,8 +391,8 @@ The following %-sequences are provided:
rate-type)) "N/A"))
(cons ?B (or charging-state "N/A"))
(cons ?b (or (and (string= charging-state "charging") "+")
(and (< capacity low) "!")
(and (< capacity warn) "-")
(and capacity (< capacity low) "!")
(and capacity (< capacity warn) "-")
""))
(cons ?h (or (and hours (number-to-string hours)) "N/A"))
(cons ?m (or (and minutes (number-to-string minutes)) "N/A"))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment