diff options
author | 2015-10-24 17:40:38 +0000 | |
---|---|---|
committer | 2015-10-24 17:40:38 +0000 | |
commit | 8a97e63eab912d5b18f18e99c3b87ded87ffc48b (patch) | |
tree | b1765c45f7a9f7b00dde05eade97944aabd74fad | |
parent | Cast isdigit()'s argument to unsigned char. (diff) | |
download | wireguard-openbsd-8a97e63eab912d5b18f18e99c3b87ded87ffc48b.tar.xz wireguard-openbsd-8a97e63eab912d5b18f18e99c3b87ded87ffc48b.zip |
Cast ctype functions' arguments to unsigned char.
ok guenther@
-rw-r--r-- | games/hack/hack.u_init.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/games/hack/hack.u_init.c b/games/hack/hack.u_init.c index ff2adadf163..a51a269efc8 100644 --- a/games/hack/hack.u_init.c +++ b/games/hack/hack.u_init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hack.u_init.c,v 1.9 2009/10/27 23:59:25 deraadt Exp $ */ +/* $OpenBSD: hack.u_init.c,v 1.10 2015/10/24 17:40:38 mmcc Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -169,7 +169,8 @@ u_init() rolesyms[i] = 0; if ((pc = pl_character[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); @@ -202,7 +203,8 @@ u_init() printf("? [%s] ", rolesyms); while ((pc = readchar())) { - 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 */ |