summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--payloads/libpayload/curses/tinycurses.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/payloads/libpayload/curses/tinycurses.c b/payloads/libpayload/curses/tinycurses.c
index 776ff16042..5e707c47db 100644
--- a/payloads/libpayload/curses/tinycurses.c
+++ b/payloads/libpayload/curses/tinycurses.c
@@ -580,7 +580,13 @@ int wnoutrefresh(WINDOW *win)
c |= tmp << 12;
}
- c |= win->_line[y].text[x].chars[0];
+ /*
+ * FIXME: Somewhere along the line, the
+ * character value is getting sign-extented.
+ * For now grab just the 8 bit character,
+ * but this will break wide characters!
+ */
+ c |= (chtype) (win->_line[y].text[x].chars[0] & 0xff);
vga_putc(y, x, c);
}
}