diff options
author | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2013-11-27 15:23:02 +0000 |
---|---|---|
committer | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2013-11-27 15:23:02 +0000 |
commit | 0bdb12eb3be403f1f062e710532a4db2184f37d0 (patch) | |
tree | f3517ddf5b88b61b54e51d172f107aef805c486b /usr.bin/tput | |
parent | 537a4b9e571135b912fb1d576b765256853103c4 (diff) |
unsigned char cast was on a wrong place.
ok okan
Diffstat (limited to 'usr.bin/tput')
-rw-r--r-- | usr.bin/tput/tput.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tput/tput.c b/usr.bin/tput/tput.c index 7236a757d17..9470469db0f 100644 --- a/usr.bin/tput/tput.c +++ b/usr.bin/tput/tput.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tput.c,v 1.18 2013/11/27 00:13:24 deraadt Exp $ */ +/* $OpenBSD: tput.c,v 1.19 2013/11/27 15:23:01 yasuoka Exp $ */ /* * Copyright (c) 1999 Todd C. Miller <Todd.Miller@courtesan.com> @@ -241,7 +241,7 @@ process(char *cap, char *str, char **argv) arg_need, cap); /* convert ascii representation of numbers to longs */ - if ((unsigned char)isdigit(argv[i][0]) + if (isdigit((unsigned char)argv[i][0]) && (l = strtol(argv[i], &cp, 10)) >= 0 && l < LONG_MAX && *cp == '\0') nargv[i] = (char *)l; |