From 39521515c3be054170eb9507c520f0e433cd304e Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 8 Nov 2016 10:09:26 +0000 Subject: 39867, tweaked: Use cast to unsigned char to test character. We want the unsigned variant to be <= 0x7f. Use the normal STOUC() macro and turn this into a single test. --- Src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Src') diff --git a/Src/utils.c b/Src/utils.c index 733f57088..d73110a3e 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -5341,7 +5341,7 @@ mb_metastrlenend(char *ptr, int width, char *eptr) inchar = *ptr; ptr++; - if (complete && (inchar >= 0 && inchar <= 0x7f)) { + if (complete && (inchar >= 0 && STOUC(inchar) <= STOUC(0x7f))) { /* * We rely on 7-bit US-ASCII as a subset, so skip * multibyte handling if we have such a character. -- cgit 1.4.1