diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-10-20 16:52:49 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-10-20 16:52:49 -0400 |
commit | f15063d9e93be934ecc2f09591b27e513b8a7a46 (patch) | |
tree | 13f9c903dab652e88b6981395d4eb28365f68b3d /src | |
parent | 3f28b7d12aff6cf2c18761cc3e00dde8360b32ab (diff) | |
download | libvt100-f15063d9e93be934ecc2f09591b27e513b8a7a46.tar.gz libvt100-f15063d9e93be934ecc2f09591b27e513b8a7a46.zip |
normalization may change the length of the utf8 sequence
Diffstat (limited to 'src')
-rw-r--r-- | src/screen.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/screen.c b/src/screen.c index 4cec9a2..d3af19c 100644 --- a/src/screen.c +++ b/src/screen.c @@ -242,6 +242,7 @@ void vt100_screen_show_string_utf8(VT100Screen *vt, char *buf, size_t len) * require an allocation */ normal = g_utf8_normalize( cell->contents, cell->len, G_NORMALIZE_NFC); + cell->len = strlen(normal); memcpy(cell->contents, normal, cell->len); free(normal); } |