Skip to content

Commit

Permalink
Merge pull request torrinfail#15 from tomboehmer/issue9
Browse files Browse the repository at this point in the history
Fixes torrinfail#9 - determine the size of the status buffer based on the number of blocks
  • Loading branch information
torrinfail authored Aug 12, 2020
2 parents 1b2e50c + 4d92b6c commit d2e6d20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dwmblocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include<X11/Xlib.h>
#define LENGTH(X) (sizeof(X) / sizeof (X[0]))
#define CMDLENGTH 50
#define STATUSLENGTH (LENGTH(blocks) * CMDLENGTH + 1)

typedef struct {
char* icon;
Expand Down Expand Up @@ -33,7 +34,7 @@ static Display *dpy;
static int screen;
static Window root;
static char statusbar[LENGTH(blocks)][CMDLENGTH] = {0};
static char statusstr[2][256];
static char statusstr[2][STATUSLENGTH];
static int statusContinue = 1;
static void (*writestatus) () = setroot;

Expand Down

0 comments on commit d2e6d20

Please sign in to comment.