Skip to content

Commit ec7e2c2

Browse files
committed
bpo-46000: improve NetBSD curses compatibility
1 parent fc012d8 commit ec7e2c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/_cursesmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,8 +1230,8 @@ PyCursesWindow_ChgAt(PyCursesWindowObject *self, PyObject *args)
12301230
return NULL;
12311231
}
12321232

1233-
color = (short)((attr >> 8) & 0xff);
1234-
attr = attr - (color << 8);
1233+
color = (short) PAIR_NUMBER(attr);
1234+
attr = attr & A_ATTRIBUTES;
12351235

12361236
if (use_xy) {
12371237
rtn = mvwchgat(self->win,y,x,num,attr,color,NULL);

0 commit comments

Comments
 (0)