all repos — tint2 @ 1272ce4bb96f6750ea4b2fe698357630c86a1d57

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

Fix issue 442: do not overflow when processing buggy battery input

git-svn-id: http://tint2.googlecode.com/svn/trunk@682 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
o9000 o9000
commit

1272ce4bb96f6750ea4b2fe698357630c86a1d57

parent

f0e2e72efc98f73cfa3ad19e7c99abeb71eebd1a

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/battery/battery.csrc/battery/battery.c

@@ -387,7 +387,7 @@ seconds -= 60 * battery_state.time.minutes;

battery_state.time.seconds = seconds; if(energy_full > 0) - new_percentage = (energy_now*100)/energy_full; + new_percentage = ((energy_now <= energy_full ? energy_now : energy_full) * 100) / energy_full; if(battery_low_status > new_percentage && battery_state.state == BATTERY_DISCHARGING && !battery_low_cmd_send) { tint_exec(battery_low_cmd);