From 964a0586dcc2885fb13242e0bcf5b2e1671df1c8 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Thu, 1 Aug 2019 22:58:20 +0200 Subject: [PATCH] fix UTF8 trimming --- src/util/unicode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/unicode.c b/src/util/unicode.c index e4e7b0d61..cbc2db7cc 100644 --- a/src/util/unicode.c +++ b/src/util/unicode.c @@ -40,7 +40,7 @@ size_t unicode_utf8_trim(char *buf) assert(buf); while (*ip) { size_t size = 1; - wint_t wc = *ip; + wint_t wc = *(unsigned char *)ip; if (wc & 0x80) { wint_t ucs = 0; if (ip[1]) {