aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bat_tray.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bat_tray.c b/bat_tray.c
index 446dcf4..f9e1328 100644
--- a/bat_tray.c
+++ b/bat_tray.c
@@ -115,7 +115,7 @@ static void update_tooltip_cache()
char time_left[64];
int seconds_left = get_bat_seconds_left();
- if (seconds_left == -1)
+ if (seconds_left < 0)
snprintf(time_left, sizeof(time_left), _("Unknown time left"));
else
snprintf(time_left, sizeof(time_left), _("%02d:%02d left"), (int)(seconds_left/3600), (int)((seconds_left%3600)/60));