summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2016-11-08 10:09:26 +0000
committerPeter Stephenson <pws@zsh.org>2016-11-08 10:09:26 +0000
commit39521515c3be054170eb9507c520f0e433cd304e (patch)
tree04a96c31a10abda07ea47c1d8f68d78326b89275 /Src
parent5411cdf378f555f8289e7feadee27d980b58f5db (diff)
downloadzsh-39521515c3be054170eb9507c520f0e433cd304e.tar.gz
zsh-39521515c3be054170eb9507c520f0e433cd304e.tar.xz
zsh-39521515c3be054170eb9507c520f0e433cd304e.zip
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.
Diffstat (limited to 'Src')
-rw-r--r--Src/utils.c2
1 files changed, 1 insertions, 1 deletions
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.