mirror of git://git.musl-libc.org/musl
fix wcwidth wrongly returning 0 for most of planes 4 and up
commit 1b0ce9af6d
introduced this bug
back in 2012 and it was never noticed, presumably since the affected
planes are essentially unused in Unicode.
This commit is contained in:
parent
a56ec7e8e2
commit
70d8060955
|
@ -23,7 +23,7 @@ int wcwidth(wchar_t wc)
|
||||||
return -1;
|
return -1;
|
||||||
if (wc-0x20000U < 0x20000)
|
if (wc-0x20000U < 0x20000)
|
||||||
return 2;
|
return 2;
|
||||||
if (wc == 0xe0001 || wc-0xe0020U < 0x5f || wc-0xe0100 < 0xef)
|
if (wc == 0xe0001 || wc-0xe0020U < 0x5f || wc-0xe0100U < 0xef)
|
||||||
return 0;
|
return 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue