aboutsummaryrefslogtreecommitdiffstats
path: root/main/musl/fix-wcwidth-wrongly-returning-0-for-most-of-planes-4.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/musl/fix-wcwidth-wrongly-returning-0-for-most-of-planes-4.patch')
-rw-r--r--main/musl/fix-wcwidth-wrongly-returning-0-for-most-of-planes-4.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/main/musl/fix-wcwidth-wrongly-returning-0-for-most-of-planes-4.patch b/main/musl/fix-wcwidth-wrongly-returning-0-for-most-of-planes-4.patch
new file mode 100644
index 0000000000..1290aca5db
--- /dev/null
+++ b/main/musl/fix-wcwidth-wrongly-returning-0-for-most-of-planes-4.patch
@@ -0,0 +1,28 @@
+From 70d80609558153a996833392999c69cdb74e1119 Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias@aerifal.cx>
+Date: Wed, 1 Jan 2020 20:02:51 -0500
+Subject: [PATCH] fix wcwidth wrongly returning 0 for most of planes 4 and up
+
+commit 1b0ce9af6d2aa7b92edaf3e9c631cb635bae22bd introduced this bug
+back in 2012 and it was never noticed, presumably since the affected
+planes are essentially unused in Unicode.
+---
+ src/ctype/wcwidth.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/ctype/wcwidth.c b/src/ctype/wcwidth.c
+index 49c40eea..36256a53 100644
+--- a/src/ctype/wcwidth.c
++++ b/src/ctype/wcwidth.c
+@@ -23,7 +23,7 @@ int wcwidth(wchar_t wc)
+ return -1;
+ if (wc-0x20000U < 0x20000)
+ return 2;
+- if (wc == 0xe0001 || wc-0xe0020U < 0x5f || wc-0xe0100 < 0xef)
++ if (wc == 0xe0001 || wc-0xe0020U < 0x5f || wc-0xe0100U < 0xef)
+ return 0;
+ return 1;
+ }
+--
+2.24.1
+