X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftty%2Ftty_update.c;h=17f641136d8ac165c0e77df8021cfed92cbd4b68;hp=fd35c47beb2e2bdd174f365736f70e04ab35ff46;hb=093902b4199bbc1d9afec433759e48344c06ed1a;hpb=30393be892025f03322b7907a04cc05cc08e8760 diff --git a/ncurses/tty/tty_update.c b/ncurses/tty/tty_update.c index fd35c47b..17f64113 100644 --- a/ncurses/tty/tty_update.c +++ b/ncurses/tty/tty_update.c @@ -84,7 +84,7 @@ #include -MODULE_ID("$Id: tty_update.c,v 1.298 2018/05/05 19:11:55 tom Exp $") +MODULE_ID("$Id: tty_update.c,v 1.299 2018/09/08 21:33:59 tom Exp $") /* * This define controls the line-breakout optimization. Every once in a @@ -373,9 +373,18 @@ PutAttrChar(NCURSES_SP_DCLx CARG_CH_T ch) } else #endif if (!SP_PARM->_screen_acs_map[c8]) { + /* + * If we found no mapping for a given alternate-character set item + * in the terminal description, attempt to use the ASCII fallback + * code which is populated in the _acs_map[] array. If that did + * not correspond to a line-drawing, etc., graphics character, the + * array entry would be empty. + */ chtype temp = UChar(SP_PARM->_acs_map[c8]); - RemAttr(attr, A_ALTCHARSET); - SetChar(my_ch, temp, AttrOf(attr)); + if (temp) { + RemAttr(attr, A_ALTCHARSET); + SetChar(my_ch, temp, AttrOf(attr)); + } } /*