summaryrefslogtreecommitdiff
path: root/games/hack
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-10-24 17:43:29 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-10-24 17:43:29 +0000
commit3bb76dba750fe1d3f13676a738e119905c6c4f56 (patch)
tree1405dedddaedf4b7a36e45ad1cfdd4a921bb8beb /games/hack
parenta449a184f6da677d741a3683e9048918a7650918 (diff)
Cast ctype functions' arguments to unsigned char.
ok guenther@
Diffstat (limited to 'games/hack')
-rw-r--r--games/hack/makedefs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/games/hack/makedefs.c b/games/hack/makedefs.c
index 44d117efee1..af1c25a909f 100644
--- a/games/hack/makedefs.c
+++ b/games/hack/makedefs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: makedefs.c,v 1.7 2009/10/27 23:59:25 deraadt Exp $ */
+/* $OpenBSD: makedefs.c,v 1.8 2015/10/24 17:43:28 mmcc Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -203,12 +203,12 @@ getentry()
while(1) {
ch = nextchar();
swi:
- if(isalpha(ch)){
+ if(isalpha((unsigned char)ch)){
ip = identif;
do {
if(ip < identif+NSZ-1) *ip++ = ch;
ch = nextchar();
- } while(isalpha(ch) || isdigit(ch));
+ } while(isalpha((unsigned char)ch) || isdigit((unsigned char)ch));
*ip = 0;
while(ch == ' ' || ch == '\t') ch = nextchar();
if(ch == '(' && !inparens && !stringseen)
@@ -294,5 +294,5 @@ getentry()
void
capitalize(char *sp)
{
- *sp = (char)toupper(*sp);
+ *sp = (char)toupper((unsigned char)*sp);
}