Fix possible coredump on BW displays

This commit is contained in:
ache 1997-09-02 19:07:50 +00:00
parent f383b45fc6
commit f1d8b3c99e

View File

@ -49,8 +49,12 @@ static void do_color(int pair, int (*outc)(int))
int fg, bg;
if ( pair == 0 ) {
tputs(orig_pair, 1, outc);
} else {
if (orig_pair) {
tputs(orig_pair, 1, outc);
}
} else if ((set_a_foreground || set_foreground) &&
(set_a_background || set_background)
) {
fg = FG(color_pairs[pair]);
bg = BG(color_pairs[pair]);