From affc3c95c3d1245b7f94e9b911291c50ed5c5363 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 8 Sep 2008 21:04:59 +0000 Subject: [PATCH] Get defaults the right way round. --- tty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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");