This commit is prompted by the preceding change to the
library's escape.c module which, in turn, was prompted
by that issue shown below (with thanks to Konstantin).
Reference(s):
https://gitlab.com/procps-ng/procps/-/issues/176
Signed-off-by: Jim Warner <james.warner@comcast.net>
if (n > 1) {
(void)mbtowc(&wc, (const char *)p, n);
- if ((n = wcwidth(wc)) < 1) n = 1;
+ // allow a zero as valid, as with a 'combining acute accent'
+ if ((n = wcwidth(wc)) < 0) n = 1;
}
return n;
#else