Only add the widths together for printable characters in prn_normal();
unprintable characters have a "width" of -1.
This commit is contained in:
parent
675d58e870
commit
6449b88bf1
@ -79,7 +79,8 @@ prn_normal(const char *s)
|
||||
for (i = 0; i < (int)clen; i++)
|
||||
putchar((unsigned char)s[i]);
|
||||
s += clen;
|
||||
n += wcwidth(wc);
|
||||
if (iswprint(wc))
|
||||
n += wcwidth(wc);
|
||||
}
|
||||
return (n);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user