From: nethack.allison Date: Sun, 24 Feb 2002 16:16:59 +0000 (+0000) Subject: nttty hilite_pet follow-up X-Git-Tag: MOVE2GIT~3128 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c6b03c83606d6a969dd33627772e106b95121ce;p=nethack nttty hilite_pet follow-up I didn't mean to override for any color in the mask. My earlier patch caused it to make green, blue, or red all become black (which still looked better than white on grey). This gets it right (famous last words), and only makes the text character's color black if it is actually white or bright white. --- diff --git a/sys/winnt/nttty.c b/sys/winnt/nttty.c index f09bfdf70..3708440ad 100644 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@ -791,7 +791,8 @@ term_start_attr(int attr) break; case ATR_INVERSE: /* Suggestion by Lee Berger */ - if (currentcolor & (FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_RED)) + if ((currentcolor & (FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_RED)) == + (FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_RED)) currentcolor = 0; currentbackground = (BACKGROUND_RED|BACKGROUND_BLUE|BACKGROUND_GREEN); colorchange = TRUE;