[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Don't mangle the color pair into attrs in setcchar
From: |
David Benjamin |
Subject: |
[PATCH] Don't mangle the color pair into attrs in setcchar |
Date: |
Sun, 17 Jul 2011 21:04:40 -0400 |
SetPair already does this. More importantly, ORing with ColorPair
without masking against A_COLOR causes bits of pairs past 256 to bleed
into other attributes. SetPair correctly handles that case (both by
masking against A_COLOR and and using oldColor).
---
ncurses/widechar/lib_cchar.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ncurses/widechar/lib_cchar.c b/ncurses/widechar/lib_cchar.c
index 67b1aa4..0856efc 100644
--- a/ncurses/widechar/lib_cchar.c
+++ b/ncurses/widechar/lib_cchar.c
@@ -80,7 +80,7 @@ setcchar(cchar_t *wcval,
memset(wcval, 0, sizeof(*wcval));
if (len != 0) {
- SetAttr(*wcval, attrs | (attr_t) ColorPair(color_pair));
+ SetAttr(*wcval, attrs);
SetPair(CHDEREF(wcval), color_pair);
memcpy(&wcval->chars, wch, len * sizeof(wchar_t));
TR(TRACE_CCALLS, ("copy %d wchars, first is %s", len,
--
1.7.6.179.gc850
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Don't mangle the color pair into attrs in setcchar,
David Benjamin <=