dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git
Log | Files | Refs | README | LICENSE

commit d469d5bb0e6c3f4369e903cee63990c60fc559f6
parent 6a50da312936b584613b8f3ad3cbcf36480d6cd9
Author: Marc Andre Tanner <mat@brain-dump.org>
Date:   Sat,  9 Mar 2013 21:52:56 +0100

vt: fix segfault with COLORS=0

Signed-off-by: Marc Andre Tanner <mat@brain-dump.org>

Diffstat:
vt.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vt.c b/vt.c @@ -2164,7 +2164,8 @@ static void init_colors(void) default_bg = COLOR_BLACK; has_default_colors = (use_default_colors() == OK); color_pairs_max = MIN(COLOR_PAIRS, MAX_COLOR_PAIRS); - color2palette = calloc((COLORS + 2) * (COLORS + 2), sizeof(short)); + if (COLORS) + color2palette = calloc((COLORS + 2) * (COLORS + 2), sizeof(short)); vt_color_reserve(COLOR_WHITE, COLOR_BLACK); }