diff --git a/tty.c b/tty.c index fae3bf59..955378ff 100644 --- a/tty.c +++ b/tty.c @@ -1,4 +1,4 @@ -/* $Id: tty.c,v 1.38 2008-09-08 17:40:51 nicm Exp $ */ +/* $Id: tty.c,v 1.39 2008-09-08 21:04:59 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -648,7 +648,7 @@ tty_attributes(struct tty *tty, u_char attr, u_char fg, u_char bg) } else { if (fg > 7) fg = 8; - if (fg == 8 && tty->term->flags & TERM_HASDEFAULTS) + if (fg == 8 && !(tty->term->flags & TERM_HASDEFAULTS)) fg = 7; if (fg == 8) tty_puts(tty, "\033[39m"); @@ -664,7 +664,7 @@ tty_attributes(struct tty *tty, u_char attr, u_char fg, u_char bg) } else { if (bg > 7) bg = 8; - if (bg == 8 && tty->term->flags & TERM_HASDEFAULTS) + if (bg == 8 && !(tty->term->flags & TERM_HASDEFAULTS)) bg = 0; if (bg == 8) tty_puts(tty, "\033[49m");