forked from speedie/spmenu
fix a possible segmentation fault
This commit is contained in:
parent
86473f5b16
commit
45a46fa4a3
|
@ -11,6 +11,9 @@
|
||||||
#define NUMBERSMAXDIGITS 100
|
#define NUMBERSMAXDIGITS 100
|
||||||
#define NUMBERSBUFSIZE (NUMBERSMAXDIGITS * 2) + 1
|
#define NUMBERSBUFSIZE (NUMBERSMAXDIGITS * 2) + 1
|
||||||
|
|
||||||
|
// item
|
||||||
|
#define MAXITEMLENGTH 1024
|
||||||
|
|
||||||
// user friendly names for all the modifiers
|
// user friendly names for all the modifiers
|
||||||
#define CONTROL ControlMask
|
#define CONTROL ControlMask
|
||||||
#define SHIFT ShiftMask
|
#define SHIFT ShiftMask
|
||||||
|
|
|
@ -39,7 +39,7 @@ drawhighlights(struct item *item, int x, int y, int w)
|
||||||
int
|
int
|
||||||
drawitem(struct item *item, int x, int y, int w)
|
drawitem(struct item *item, int x, int y, int w)
|
||||||
{
|
{
|
||||||
char buffer[sizeof(item->text) + lrpad / 2];
|
char buffer[MAXITEMLENGTH];
|
||||||
Clr scm[3];
|
Clr scm[3];
|
||||||
int lp = lrpad / 2; // padding
|
int lp = lrpad / 2; // padding
|
||||||
int wr, rd;
|
int wr, rd;
|
||||||
|
|
Loading…
Reference in a new issue