Copy ACS characters as UTF-8, from Balazs Kezes.

This commit is contained in:
nicm
2014-10-02 08:36:26 +00:00
parent 045d0c3b9f
commit 2f19df09b1
3 changed files with 11 additions and 1 deletions

View File

@ -81,7 +81,7 @@ tty_acs_get(struct tty *tty, u_char ch)
struct tty_acs_entry *entry;
/* If not a UTF-8 terminal, use the ACS set. */
if (!(tty->flags & TTY_UTF8)) {
if (tty != NULL && !(tty->flags & TTY_UTF8)) {
if (tty->term->acs[ch][0] == '\0')
return (NULL);
return (&tty->term->acs[ch][0]);