diff options
author | mmcc <mmcc@cvs.openbsd.org> | 2015-10-24 18:14:10 +0000 |
---|---|---|
committer | mmcc <mmcc@cvs.openbsd.org> | 2015-10-24 18:14:10 +0000 |
commit | fd59d4e1c8112e07e127a30ddffce76bbc040b9b (patch) | |
tree | de1c2e05069f752a81b6cf06db52eb65d8908fb7 /games | |
parent | f99517eb4e6a2b0d7b22e079e609b60f3af38818 (diff) |
Cast ctype functions' arguments to unsigned char.
ok guenther@
Diffstat (limited to 'games')
-rw-r--r-- | games/sail/pl_4.c | 4 | ||||
-rw-r--r-- | games/sail/pl_5.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/games/sail/pl_4.c b/games/sail/pl_4.c index 12ff6069a1b..908bf3f3501 100644 --- a/games/sail/pl_4.c +++ b/games/sail/pl_4.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pl_4.c,v 1.4 2009/10/27 23:59:27 deraadt Exp $ */ +/* $OpenBSD: pl_4.c,v 1.5 2015/10/24 18:14:09 mmcc Exp $ */ /* $NetBSD: pl_4.c,v 1.4 1995/04/24 12:25:17 cgd Exp $ */ /* @@ -84,7 +84,7 @@ lookout() sgetstr("What ship? ", buf, sizeof buf); foreachship(sp) { c = *countryname[sp->nationality]; - if ((c == *buf || tolower(c) == *buf || colours(sp) == *buf) + if ((c == *buf || tolower((unsigned char)c) == *buf || colours(sp) == *buf) && (sp->file->stern == buf[1] || sterncolour(sp) == buf[1] || buf[1] == '?')) { eyeball(sp); diff --git a/games/sail/pl_5.c b/games/sail/pl_5.c index 858d36c1447..2b804a50b10 100644 --- a/games/sail/pl_5.c +++ b/games/sail/pl_5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pl_5.c,v 1.6 2009/10/27 23:59:27 deraadt Exp $ */ +/* $OpenBSD: pl_5.c,v 1.7 2015/10/24 18:14:09 mmcc Exp $ */ /* $NetBSD: pl_5.c,v 1.4 1995/04/24 12:25:21 cgd Exp $ */ /* @@ -106,7 +106,7 @@ acceptmove() *p-- = '\0'; break; default: - if (!isspace(*p)) { + if (!isspace((unsigned char)*p)) { Msg("Input error."); *p-- = '\0'; } @@ -202,7 +202,7 @@ parties(crew, to, isdefense, buf) for (k = 0; k < 3; k++) temp[k] = crew[k]; - if (isdigit(buf)) { + if (isdigit((unsigned char)buf)) { ptr = isdefense ? to->file->DBP : to->file->OBP; for (j = 0; j < NBP && ptr[j].turnsent; j++) ; |