From a85f8ccf46dc1473d6202e60e7d50be8ede0bf9b Mon Sep 17 00:00:00 2001 From: mmcc Date: Fri, 16 Oct 2015 17:14:04 +0000 Subject: [PATCH] Cast iscntrl()'s arg to unsigned char. ok nicm@ --- bin/ksh/emacs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/ksh/emacs.c b/bin/ksh/emacs.c index eaf5bbd7693..8597b80306a 100644 --- a/bin/ksh/emacs.c +++ b/bin/ksh/emacs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: emacs.c,v 1.56 2015/10/10 15:31:00 millert Exp $ */ +/* $OpenBSD: emacs.c,v 1.57 2015/10/16 17:14:04 mmcc Exp $ */ /* * Emacs-like command line editing and history @@ -1257,7 +1257,7 @@ kb_decode(const char *s) l[0] = '\0'; for (i = 0; i < strlen(s); i++) { - if (iscntrl(s[i])) { + if (iscntrl((unsigned char)s[i])) { l[at++] = '^'; l[at++] = UNCTRL(s[i]); } else -- 2.20.1