diff options
author | jkh <jkh@FreeBSD.org> | 1996-09-06 05:55:48 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-09-06 05:55:48 +0000 |
commit | b83f9c3559c37283a817dd18c9a4713b4e3ce785 (patch) | |
tree | e18a56af0fbd60fe2e054a8f1a9d36406800b143 /lib/libncurses/lib_kernel.c | |
parent | 458938509f81d8f57dba30656c647d150d1589a5 (diff) | |
download | FreeBSD-src-b83f9c3559c37283a817dd18c9a4713b4e3ce785.zip FreeBSD-src-b83f9c3559c37283a817dd18c9a4713b4e3ce785.tar.gz |
Don't smash attributes when turning color values off. This was submitted
as a PR to GNATs but it evidently went astray somehow since I can't find
it in the database now, nor does an assigned PR# appear on the mail I got.
Sorry about that, Danny!
Submitted-By: Danny R. Johnston <danny@simn.com>
Diffstat (limited to 'lib/libncurses/lib_kernel.c')
-rw-r--r-- | lib/libncurses/lib_kernel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libncurses/lib_kernel.c b/lib/libncurses/lib_kernel.c index bd81fe1..a96cbfc 100644 --- a/lib/libncurses/lib_kernel.c +++ b/lib/libncurses/lib_kernel.c @@ -44,12 +44,12 @@ int wattroff(WINDOW *win, chtype at) if (PAIR_NUMBER(at) == 0xff) /* turn off color */ win->_attrs &= ~at; else /* leave color alone */ - win->_attrs &= ~(at|~A_COLOR); + win->_attrs &= ~(at & ~A_COLOR); } else { if (PAIR_NUMBER(at) > 0x00) /* turn off color */ win->_attrs &= ~at; else /* leave color alone */ - win->_attrs &= ~(at|~A_COLOR); + win->_attrs &= ~(at & ~A_COLOR); } T(("new attribute is %s", _traceattr(win->_attrs))); return OK; |