mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-28 04:13:44 +00:00
Fix crash caused if a unicode combing character is sent before any text
This commit is contained in:
parent
4098b33bb7
commit
27a1f27e59
1 changed files with 1 additions and 0 deletions
|
|
@ -320,6 +320,7 @@ width(Line *self, PyObject *val) {
|
|||
|
||||
void
|
||||
line_add_combining_char(Line *self, uint32_t ch, unsigned int x) {
|
||||
if (!self->cells[x].ch) return; // dont allow adding combining chars to a null cell
|
||||
combining_type c = self->cells[x].cc;
|
||||
if (c & CC_MASK) self->cells[x].cc = (c & CC_MASK) | ( (ch & CC_MASK) << CC_SHIFT );
|
||||
else self->cells[x].cc = ch & CC_MASK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue