From f15063d9e93be934ecc2f09591b27e513b8a7a46 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 20 Oct 2014 16:52:49 -0400 Subject: normalization may change the length of the utf8 sequence --- src/screen.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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); } -- cgit v1.2.3