According to SUSv2, always return 0 for null wide-character code
This commit is contained in:
parent
4cb63b194b
commit
34e5c81b71
@ -52,7 +52,12 @@ int
|
||||
wcwidth(wc)
|
||||
wchar_t wc;
|
||||
{
|
||||
int width = __maskrune(wc, _CTYPE_SWM);
|
||||
int width;
|
||||
|
||||
if (wc == 0)
|
||||
return (0);
|
||||
|
||||
width = __maskrune(wc, _CTYPE_SWM);
|
||||
|
||||
/* 0 is autowidth (default) */
|
||||
return (width ? (int)((unsigned)width >> _CTYPE_SWS)
|
||||
|
Loading…
Reference in New Issue
Block a user