aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-07-15 11:39:53 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-07-15 11:39:53 +0000
commit470489c3a3118d30c82c2f7909374693cfddc9cd (patch)
treeb319140440d1bb029b839db24baef30fc330a13c
parentvt: \EB and \E0 have an optional "private", not param (which are CSI only) (diff)
vt: there are NULL entries in the alternate charset
-rw-r--r--vt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vt.c b/vt.c
index d6634e9d..4d04f4ba 100644
--- a/vt.c
+++ b/vt.c
@@ -757,7 +757,9 @@ action_print(struct terminal *term, uint8_t c)
if (unlikely(term->charset[term->selected_charset] == CHARSET_GRAPHIC) &&
c >= 0x41 && c <= 0x7e)
{
- strncpy(cell->c, vt100_0[c - 0x41], sizeof(cell->c));
+ const char *glyph = vt100_0[c - 0x41];
+ if (glyph != NULL)
+ strncpy(cell->c, glyph, sizeof(cell->c));
} else {
//LOG_DBG("print: ASCII: %c", c);
cell->c[0] = c;