diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-07-10 16:47:32 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-07-10 16:47:32 +0000 |
| commit | b1f8dd75d684b3dd00f147a63ef687a6b566fc7f (patch) | |
| tree | 354ae58f2fe2ebe3199656cdd7f9e011ee812ed3 /vt.c | |
| parent | terminal: remove 'blink' attribute from cell struct (diff) | |
cell: we only need 4 bytes for the longest utf8 sequence
We don't *have* to NULL-terminate the utf8 string. So don't. This
makes the cell glyph 4 bytes exactly, which is better for alignment
and cache usage.
Diffstat (limited to 'vt.c')
| -rw-r--r-- | vt.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -757,7 +757,7 @@ action_print(struct terminal *term, uint8_t c) if (unlikely(term->charset[term->selected_charset] == CHARSET_GRAPHIC) && c >= 0x41 && c <= 0x7e) { - strcpy(cell->c, vt100_0[c - 0x41]); + strncpy(cell->c, vt100_0[c - 0x41], sizeof(cell->c)); } else { //LOG_DBG("print: ASCII: %c", c); cell->c[0] = c; |
