Re: [PATCH] curses: correctly pass color and attributes to setcchar()

2019-10-03 Thread Matthew Kilgore
Hi Philippe, On Thu, Oct 03, 2019 at 09:36:56AM +0200, Philippe Mathieu-Daudé wrote: Hi Matthew, On 10/3/19 2:18 AM, Matthew Kilgore wrote: The current code uses getcchar() and setcchar() to handle the cchar_t values, which is correct, however it incorrectly deconstructs the chtype value that

Re: [PATCH] curses: correctly pass color and attributes to setcchar()

2019-10-03 Thread Philippe Mathieu-Daudé
Hi Matthew, On 10/3/19 2:18 AM, Matthew Kilgore wrote: The current code uses getcchar() and setcchar() to handle the cchar_t values, which is correct, however it incorrectly deconstructs the chtype value that it then passes to setcchar(): 1. The bit mask 0xff against the chtype is not guar

[PATCH] curses: correctly pass color and attributes to setcchar()

2019-10-02 Thread Matthew Kilgore
The current code uses getcchar() and setcchar() to handle the cchar_t values, which is correct, however it incorrectly deconstructs the chtype value that it then passes to setcchar(): 1. The bit mask 0xff against the chtype is not guaranteed to be correct. curses provides the 'A_ATTRIBU