According to SUSv2, always return 0 for null wide-character code
This commit is contained in:
parent
71551c8840
commit
57b58c92d3
@ -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