1
0
mirror of https://github.com/openbsd/src.git synced 2026-04-23 21:54:32 +00:00
daniel 70d21af179 wcwidth(3): fix return value for L'\0'
wcwidth(3) doesn't return the correct result for the NUL wide character.
Fix this by special casing the check for this value.

Interestingly our man page documents this special case explicitly, but it
looks like the function was broken in rev 1.2 from 2011 when support for
non-printable characters was added.

Flagged by Sortix os-test.

ok stsp@
2026-03-27 20:35:08 +00:00
2026-03-27 19:19:41 +00:00
2026-03-26 06:12:38 +00:00
Description
No description provided
1.6 GiB
Languages
C 57.4%
C++ 28.7%
Perl 3.9%
Roff 3%
Makefile 0.9%
Other 5.6%