wcwidth: fix espression to work correctly with SWIDTH0
This commit is contained in:
parent
6c56d93528
commit
c87e6b26b0
@ -217,7 +217,9 @@ int
|
||||
wcwidth(wc)
|
||||
wchar_t wc;
|
||||
{
|
||||
int width = (unsigned)__maskrune((wc), _CTYPE_SWM) >> _CTYPE_SWS;
|
||||
return width ? width : iswprint(wc);
|
||||
int width = __maskrune(wc, _CTYPE_SWM);
|
||||
|
||||
return (width ? (unsigned)width >> _CTYPE_SWS
|
||||
: iswprint(wc) != 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user