diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2006-11-01 14:24:37 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2006-11-01 14:24:37 +0000 |
commit | 5c79f850e1a1d90b1b3aa96ce3d523d7fa80774a (patch) | |
tree | 81be7f039723219dee39df242a9ea98569d26855 /lisp/battery.el | |
parent | 6a3f3de849030c21b5d22487c4ddceff19706464 (diff) | |
download | emacs-5c79f850e1a1d90b1b3aa96ce3d523d7fa80774a.tar.gz |
* battery.el (battery-linux-proc-acpi): Prevent range error when
`full-capacity' is 0.
Diffstat (limited to 'lisp/battery.el')
-rw-r--r-- | lisp/battery.el | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/battery.el b/lisp/battery.el index 50edc8dde8a..ec35e04e1ab 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -408,6 +408,7 @@ The following %-sequences are provided: (format "%d:%02d" hours (- minutes (* 60 hours)))) "N/A")) (cons ?p (or (and full-capacity capacity + (> full-capacity 0) (number-to-string (floor (/ capacity (/ (float full-capacity) 100))))) |