mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-22 05:33:45 -04:00
vt: there are NULL entries in the alternate charset
This commit is contained in:
parent
6bf75d199b
commit
470489c3a3
1 changed files with 3 additions and 1 deletions
4
vt.c
4
vt.c
|
|
@ -757,7 +757,9 @@ action_print(struct terminal *term, uint8_t c)
|
||||||
if (unlikely(term->charset[term->selected_charset] == CHARSET_GRAPHIC) &&
|
if (unlikely(term->charset[term->selected_charset] == CHARSET_GRAPHIC) &&
|
||||||
c >= 0x41 && c <= 0x7e)
|
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 {
|
} else {
|
||||||
//LOG_DBG("print: ASCII: %c", c);
|
//LOG_DBG("print: ASCII: %c", c);
|
||||||
cell->c[0] = c;
|
cell->c[0] = c;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue