bat: fix broken battery remaining time (was always N/A)

Bug was introduced in commit dc556e5415 and the new discharging
symbol.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
This commit is contained in:
Lyderic Lefever 2013-12-25 12:31:43 +01:00 committed by Adrian C. (anrxc)
parent bfbc1bdd51
commit 6e16a412ef
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ local function worker(format, warg)
if rate ~= nil and rate ~= 0 then
if state == "+" then
timeleft = (tonumber(capacity) - tonumber(remaining)) / tonumber(rate)
elseif state == "-" then
elseif state == "" then
timeleft = tonumber(remaining) / tonumber(rate)
else
return {state, percent, time, wear}