diff options
author | mmcc <mmcc@cvs.openbsd.org> | 2015-10-24 18:02:29 +0000 |
---|---|---|
committer | mmcc <mmcc@cvs.openbsd.org> | 2015-10-24 18:02:29 +0000 |
commit | 6b5a848c0a995c8a68664fede9d3f06367d51041 (patch) | |
tree | f1f9edc81d304b9bdaa70bfc09e676f9a0a4339d /games/fortune | |
parent | 1d087e6cc3090372b620cf0ac19c7b68c73aecbd (diff) |
Cast isdigit()'s argument to unsigned char.
ok guenther@
Diffstat (limited to 'games/fortune')
-rw-r--r-- | games/fortune/fortune/fortune.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/games/fortune/fortune/fortune.c b/games/fortune/fortune/fortune.c index c928fd3f019..2de3ce95c4f 100644 --- a/games/fortune/fortune/fortune.c +++ b/games/fortune/fortune/fortune.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fortune.c,v 1.43 2015/08/26 14:49:20 semarie Exp $ */ +/* $OpenBSD: fortune.c,v 1.44 2015/10/24 18:02:28 mmcc Exp $ */ /* $NetBSD: fortune.c,v 1.8 1995/03/23 08:28:40 cgd Exp $ */ /*- @@ -324,11 +324,11 @@ form_file_list(char **files, int file_cnt) } for (i = 0; i < file_cnt; i++) { percent = NO_PROB; - if (!isdigit(files[i][0])) + if (!isdigit((unsigned char)files[i][0])) sp = files[i]; else { percent = 0; - for (sp = files[i]; isdigit(*sp); sp++) + for (sp = files[i]; isdigit((unsigned char)*sp); sp++) percent = percent * 10 + *sp - '0'; if (percent > 100) { fprintf(stderr, "percentages must be <= 100\n"); |