summaryrefslogtreecommitdiff
path: root/usr.bin/mg/extend.c
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2014-11-16 00:59:26 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2014-11-16 00:59:26 +0000
commitfee82a1a99b707661d95cc455eb8aef3643fc2b4 (patch)
treecf5f4a3c3f75df290b83564bb1e7dd2dce2a8e1b /usr.bin/mg/extend.c
parent8e0f50f2f8a509eef0daed09eadc9c1895355fc9 (diff)
ctype macros/functions expect unsigned char values. Note that the lgetc()
macro does the cast internally like getc() does, so its return should be put an in int for the same reason. based on a diff from Kamil Rytarowski (n54 (at) gmx.com)
Diffstat (limited to 'usr.bin/mg/extend.c')
-rw-r--r--usr.bin/mg/extend.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mg/extend.c b/usr.bin/mg/extend.c
index ef59d5f05a7..7a4f0c6a49b 100644
--- a/usr.bin/mg/extend.c
+++ b/usr.bin/mg/extend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: extend.c,v 1.55 2014/04/02 20:32:00 lum Exp $ */
+/* $OpenBSD: extend.c,v 1.56 2014/11/16 00:59:25 guenther Exp $ */
/* This file is in the public domain. */
@@ -446,7 +446,7 @@ dobindkey(KEYMAP *map, const char *func, const char *str)
for (i = 0; *str && i < MAXKEY; i++) {
/* XXX - convert numbers w/ strol()? */
if (*str == '^' && *(str + 1) != '\0') {
- key.k_chars[i] = CCHR(toupper(*++str));
+ key.k_chars[i] = CCHR(toupper((unsigned char)*++str));
} else if (*str == '\\' && *(str + 1) != '\0') {
switch (*++str) {
case '^':