mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
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>
This commit is contained in:
parent
0b64164fca
commit
479c200dea
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue