chars: speed up the determination of length and width for plain ASCII

master
Benno Schulenberg 2019-06-10 17:22:41 +02:00
parent 7d38379919
commit c5955d14ce
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ char control_mbrep(const char *c, bool isdata)
int length_of_char(const char *c, int *width)
{
#ifdef ENABLE_UTF8
if (use_utf8) {
if (use_utf8 && (signed char)*c < 0) {
wchar_t wc;
int charlen = mbtowc(&wc, c, MAXCHARLEN);