Do not try to display items with negative width
Don't display anything rather than segfault if the appointment panel becomes too small (e.g. during a terminal resize). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
parent
6c6c7d5ec0
commit
bc2bead505
@ -354,6 +354,9 @@ display_item (int incolor, char *msg, int recur, int note, int len, int y,
|
|||||||
int ch_recur, ch_note;
|
int ch_recur, ch_note;
|
||||||
char buf[len];
|
char buf[len];
|
||||||
|
|
||||||
|
if (len <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
win = apad.ptrwin;
|
win = apad.ptrwin;
|
||||||
ch_recur = (recur) ? '*' : ' ';
|
ch_recur = (recur) ? '*' : ' ';
|
||||||
ch_note = (note) ? '>' : ' ';
|
ch_note = (note) ? '>' : ' ';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user