diff options
| author | Thomas Klausner <tk@giga.or.at> | 2021-12-10 10:41:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-10 11:41:47 +0200 |
| commit | 2fb797e93c6bbd44dfcbe23f63acfa240a87e48a (patch) | |
| tree | 2687b3f5494499d6b88c2c2dcd19d4fef495f5dc /Modules/_cursesmodule.c | |
| parent | 8c74713d0e349c27518080945d5f040dfd52a56e (diff) | |
| download | cpython-git-2fb797e93c6bbd44dfcbe23f63acfa240a87e48a.tar.gz | |
bpo-46000: Improve NetBSD curses compatibility (GH-29947)
Diffstat (limited to 'Modules/_cursesmodule.c')
| -rw-r--r-- | Modules/_cursesmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 3770a032e9..7ebad692c2 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -1230,8 +1230,8 @@ PyCursesWindow_ChgAt(PyCursesWindowObject *self, PyObject *args) return NULL; } - color = (short)((attr >> 8) & 0xff); - attr = attr - (color << 8); + color = (short) PAIR_NUMBER(attr); + attr = attr & A_ATTRIBUTES; if (use_xy) { rtn = mvwchgat(self->win,y,x,num,attr,color,NULL); |
