diff options
author | 2013-11-27 15:23:01 +0000 | |
---|---|---|
committer | 2013-11-27 15:23:01 +0000 | |
commit | 2a9817063aba1d3d9fd0e64be4feeaacbc27ac00 (patch) | |
tree | 3ec28934b66793fc5d498fe26ae14d14d4b2d229 | |
parent | document better how priorities work, and fix an example; (diff) | |
download | wireguard-openbsd-2a9817063aba1d3d9fd0e64be4feeaacbc27ac00.tar.xz wireguard-openbsd-2a9817063aba1d3d9fd0e64be4feeaacbc27ac00.zip |
unsigned char cast was on a wrong place.
ok okan
-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; |