summaryrefslogtreecommitdiff
path: root/games/hack/hack.invent.c
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-10-24 17:37:57 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-10-24 17:37:57 +0000
commit25a318de79c93327b530cd976780bfa1b3809545 (patch)
treee52ab143eb067a0e0a1164687a89d08988440e84 /games/hack/hack.invent.c
parente0eea937eb876a4d7470e86e9f77f76a3d6afb66 (diff)
Cast isdigit()'s argument to unsigned char.
ok guenther@
Diffstat (limited to 'games/hack/hack.invent.c')
-rw-r--r--games/hack/hack.invent.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/games/hack/hack.invent.c b/games/hack/hack.invent.c
index f5b355049ab..5c6c8aa342b 100644
--- a/games/hack/hack.invent.c
+++ b/games/hack/hack.invent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hack.invent.c,v 1.11 2015/09/27 05:13:11 guenther Exp $ */
+/* $OpenBSD: hack.invent.c,v 1.12 2015/10/24 17:37:56 mmcc Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -437,7 +437,7 @@ getobj(char *let, char *word)
cnt = 0;
ilet = readchar();
- while(isdigit(ilet) && allowcnt) {
+ while(isdigit((unsigned char)ilet) && allowcnt) {
if (cnt < 100000000)
cnt = 10*cnt + (ilet - '0');
else
@@ -445,7 +445,7 @@ getobj(char *let, char *word)
allowcnt = 2; /* signal presence of cnt */
ilet = readchar();
}
- if(isdigit(ilet)) {
+ if(isdigit((unsigned char)ilet)) {
pline("No count allowed with this command.");
continue;
}