Using blinking/bright background colors would crash irssi..

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@619 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-08-22 21:39:18 +00:00 committed by cras
commit 08c6484b6b
4 changed files with 17 additions and 2 deletions

View file

@ -222,7 +222,7 @@ static void line_add_colors(GUI_WINDOW_REC *gui, int fg, int bg, int flags)
/* color should never have last bit on or it would be treated as a
command! */
color = (fg & 0x0f) | ((bg & 0x0f) << 4);
color = (fg & 0x0f) | ((bg & 0x07) << 4);
pos = 0;
if (((fg & ATTR_COLOR8) == 0 && (fg|(bg << 4)) != gui->last_color) ||
@ -239,6 +239,10 @@ static void line_add_colors(GUI_WINDOW_REC *gui, int fg, int bg, int flags)
buffer[pos++] = 0;
buffer[pos++] = LINE_CMD_COLOR8;
}
if (bg & 0x08) {
buffer[pos++] = 0;
buffer[pos++] = LINE_CMD_BLINK;
}
if (flags & PRINTFLAG_INDENT) {
buffer[pos++] = 0;
buffer[pos++] = LINE_CMD_INDENT;