From a5db139a0a671e1f7422d6cd387f4bc8d0afb8e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Sun, 10 Jan 2021 15:57:46 +0100 Subject: Linux: use correct column alignment for wide fields This affects: - PROC_COMM, PROC_EXE and CWD on Linux - JAIL on FreeBSD and DragonFlyBSD - ZONE on Solaris --- RichString.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'RichString.c') diff --git a/RichString.c b/RichString.c index 9b69e98c..01305806 100644 --- a/RichString.c +++ b/RichString.c @@ -60,7 +60,7 @@ static inline int RichString_writeFromWide(RichString* this, int attrs, const ch this->chptr[i] = (CharType) { .attr = attrs & 0xffffff, .chars = { (iswprint(data[j]) ? data[j] : '?') } }; } - return len; + return wcswidth(data, len); } static inline int RichString_writeFromAscii(RichString* this, int attrs, const char* data, int from, int len) { -- cgit v1.2.3