Skip to content
This repository has been archived by the owner on Jan 5, 2018. It is now read-only.

Commit

Permalink
protect against huge counters in battery on switch
Browse files Browse the repository at this point in the history
  • Loading branch information
Unia committed Oct 13, 2013
1 parent 91e5c00 commit 6cab72a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dwmst.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ char *get_battery (char *buf) {
else {
/*if (perc < BAT_LOW_P || minutes < BAT_LOW_T)*/
/*notify*/
snprintf (buf, 24, BAT_STR, perc, hours, minutes);
snprintf (buf, 35, BAT_STR, perc, hours, minutes);
}
}
} else
Expand All @@ -131,7 +131,7 @@ char *get_battery (char *buf) {
int main(void) {
Display *dpy;
Window root;
char status[256], music[184], skype[6], net[30], volume[12], battery[24];
char status[256], music[173], skype[6], net[30], volume[12], battery[35];
int netloops = 60, musicloops = 10;
DBusGProxy *session = NULL;
DBusGConnection *connection = NULL;
Expand Down

0 comments on commit 6cab72a

Please sign in to comment.