david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[console] Fix display of characters with top bit set

Inhibit implicit sign-padding of characters with the top bit set
(e.g. accented characters), which confuses the mucurses library by
colliding with the bits used to store character attributes and
colours.

Reported-by: Marc Delisle <Marc.Delisle@cegepsherbrooke.qc.ca>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2014-03-13 14:20:10 +00:00
parent 2602965806
commit a17ee3610d
2 changed files with 2 additions and 2 deletions

View File

@ -167,7 +167,7 @@ static char * format_decimal ( char *end, signed long num, int width,
* Call's the printf_context::handler() method and increments
* printf_context::len.
*/
static inline void cputchar ( struct printf_context *ctx, unsigned int c ) {
static inline void cputchar ( struct printf_context *ctx, unsigned char c ) {
ctx->handler ( ctx, c );
++ctx->len;
}

View File

@ -75,7 +75,7 @@ void _wputch ( WINDOW *win, chtype ch, int wrap ) {
* @v wrap wrap "switch"
*/
void _wputc ( WINDOW *win, char c, int wrap ) {
_wputch ( win, ( c | win->attrs ), wrap );
_wputch ( win, ( ( ( unsigned char ) c ) | win->attrs ), wrap );
}
/**