summaryrefslogtreecommitdiff
path: root/games/hack/hack.u_init.c
diff options
context:
space:
mode:
authordsl <dsl@NetBSD.org>2004-11-05 21:30:31 +0000
committerdsl <dsl@NetBSD.org>2004-11-05 21:30:31 +0000
commit49f7d8a9b16b4572126fbdd1522ff8f3eacdcab9 (patch)
treec24c2a4d6bddff7213ba29e20b3fddf68d9f2953 /games/hack/hack.u_init.c
parentc68edd41b3096be2bf32ea4de03be257b9dbc4c0 (diff)
Add (unsigned char) cast to ctype functions
Diffstat (limited to 'games/hack/hack.u_init.c')
-rw-r--r--games/hack/hack.u_init.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/games/hack/hack.u_init.c b/games/hack/hack.u_init.c
index 97246c61342..9b1110293f2 100644
--- a/games/hack/hack.u_init.c
+++ b/games/hack/hack.u_init.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.u_init.c,v 1.7 2003/04/02 18:36:41 jsm Exp $ */
+/* $NetBSD: hack.u_init.c,v 1.8 2004/11/05 21:30:32 dsl Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.u_init.c,v 1.7 2003/04/02 18:36:41 jsm Exp $");
+__RCSID("$NetBSD: hack.u_init.c,v 1.8 2004/11/05 21:30:32 dsl Exp $");
#endif /* not lint */
#include <ctype.h>
@@ -169,8 +169,8 @@ u_init()
rolesyms[i] = 0;
if ((pc = pl_character[0]) != '\0') {
- if (islower(pc))
- pc = toupper(pc);
+ if (islower((unsigned char)pc))
+ pc = toupper((unsigned char)pc);
if ((i = role_index(pc)) >= 0)
goto got_suffix; /* implies experienced */
printf("\nUnknown role: %c\n", pc);
@@ -201,8 +201,8 @@ u_init()
printf("? [%s] ", rolesyms);
while ((pc = readchar()) != '\0') {
- if (islower(pc))
- pc = toupper(pc);
+ if (islower((unsigned char)pc))
+ pc = toupper((unsigned char)pc);
if ((i = role_index(pc)) >= 0) {
printf("%c\n", pc); /* echo */
(void) fflush(stdout); /* should be seen */