diff options
author | mmcc <mmcc@cvs.openbsd.org> | 2015-10-24 18:39:06 +0000 |
---|---|---|
committer | mmcc <mmcc@cvs.openbsd.org> | 2015-10-24 18:39:06 +0000 |
commit | faae6dea502424d0a45c05e77360b984ad09eb69 (patch) | |
tree | 1fc9f9446517d93a5dedf85bb4084e3ad3d532d4 /games/monop | |
parent | e4de84c5f7c85c22c659bc2937a6988000ea011a (diff) |
Cast ctype functions' argument to unsigned char.
ok guenther@
Diffstat (limited to 'games/monop')
-rw-r--r-- | games/monop/getinp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/games/monop/getinp.c b/games/monop/getinp.c index ad93241656a..6eb8c8fa324 100644 --- a/games/monop/getinp.c +++ b/games/monop/getinp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getinp.c,v 1.9 2009/10/27 23:59:26 deraadt Exp $ */ +/* $OpenBSD: getinp.c,v 1.10 2015/10/24 18:39:05 mmcc Exp $ */ /* $NetBSD: getinp.c,v 1.4 1995/04/24 12:24:20 cgd Exp $ */ /* @@ -79,8 +79,8 @@ getinp(prompt, list) if ((sp = strchr(buf, '\n')) != NULL) *sp = '\0'; for (sp = buf; *sp; sp++) - if (isupper(*sp)) - *sp = tolower(*sp); + if (isupper((unsigned char)*sp)) + *sp = tolower((unsigned char)*sp); for (i = n_match = 0; list[i]; i++) if (comp(list[i])) { n_match++; @@ -102,7 +102,8 @@ comp(s1) if (buf[0] != '\0') for (sp = buf, tsp = s1; *sp; ) { - c = isupper(*tsp) ? tolower(*tsp) : *tsp; + c = isupper((unsigned char)*tsp) ? + tolower((unsigned char)*tsp) : *tsp; tsp++; if (c != *sp++) return 0; |