diff --git a/libs/define.c b/libs/define.c index 03bc275..da6035d 100644 --- a/libs/define.c +++ b/libs/define.c @@ -11,6 +11,9 @@ #define NUMBERSMAXDIGITS 100 #define NUMBERSBUFSIZE (NUMBERSMAXDIGITS * 2) + 1 +// item +#define MAXITEMLENGTH 1024 + // user friendly names for all the modifiers #define CONTROL ControlMask #define SHIFT ShiftMask diff --git a/libs/draw.c b/libs/draw.c index ca53151..277eeaf 100644 --- a/libs/draw.c +++ b/libs/draw.c @@ -39,7 +39,7 @@ drawhighlights(struct item *item, int x, int y, int w) int drawitem(struct item *item, int x, int y, int w) { - char buffer[sizeof(item->text) + lrpad / 2]; + char buffer[MAXITEMLENGTH]; Clr scm[3]; int lp = lrpad / 2; // padding int wr, rd;