diff options
author | mmcc <mmcc@cvs.openbsd.org> | 2015-10-24 18:04:07 +0000 |
---|---|---|
committer | mmcc <mmcc@cvs.openbsd.org> | 2015-10-24 18:04:07 +0000 |
commit | dd1f74eef3b0d583e9c827e76ca84b3b8fde87f3 (patch) | |
tree | 7084bf6a0decb9f82be1aeab709feb78faf69e16 /games/cribbage | |
parent | 6b5a848c0a995c8a68664fede9d3f06367d51041 (diff) |
Cast ctype functions' arguments to unsigned char.
ok guenther@
Diffstat (limited to 'games/cribbage')
-rw-r--r-- | games/cribbage/io.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/games/cribbage/io.c b/games/cribbage/io.c index 484a34d9e73..40ea3e494bd 100644 --- a/games/cribbage/io.c +++ b/games/cribbage/io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: io.c,v 1.19 2014/05/09 23:56:26 schwarze Exp $ */ +/* $OpenBSD: io.c,v 1.20 2015/10/24 18:04:06 mmcc Exp $ */ /* $NetBSD: io.c,v 1.9 1997/07/09 06:25:47 phil Exp $ */ /*- @@ -318,15 +318,15 @@ number(int lo, int hi, char *prompt) } sum = 0; - if (!isdigit(*p)) + if (!isdigit((unsigned char)*p)) sum = lo - 1; else - while (isdigit(*p)) { + while (isdigit((unsigned char)*p)) { tmp = 10 * sum + (*p - '0'); /* Overflow */ if (tmp < sum) { sum = hi + 1; - while (isdigit(*p)) + while (isdigit((unsigned char)*p)) ++p; break; } @@ -398,8 +398,8 @@ endmsg(void) /* All messages should start with uppercase */ mvaddch(lastline + Y_MSG_START, SCORE_X, ' '); - if (islower(Msgbuf[0]) && Msgbuf[1] != ')') - Msgbuf[0] = toupper(Msgbuf[0]); + if (islower((unsigned char)Msgbuf[0]) && Msgbuf[1] != ')') + Msgbuf[0] = toupper((unsigned char)Msgbuf[0]); mp = Msgbuf; len = strlen(mp); if (len / MSG_X + Lineno >= MSG_Y) { |