diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-06-28 16:17:41 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-06-28 18:28:21 +0200 |
commit | bc2bead505eba9dc95ddadbcf465422927d787b5 (patch) | |
tree | db7eaed0b9242f9c62122c5522b9a09cb689ef37 /src | |
parent | 6c6c7d5ec076a8b8f0e934cb3e756f2b72bd15b7 (diff) | |
download | calcurse-bc2bead505eba9dc95ddadbcf465422927d787b5.zip |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/day.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -354,6 +354,9 @@ display_item (int incolor, char *msg, int recur, int note, int len, int y, int ch_recur, ch_note; char buf[len]; + if (len <= 0) + return; + win = apad.ptrwin; ch_recur = (recur) ? '*' : ' '; ch_note = (note) ? '>' : ' '; |