sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit f59e71673251484dcc627d685cb36de6f6662636
parent 814da3d59509bacb9d2ccc7d1a9a8d87d4ef14f8
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Mon Apr 20 21:17:53 +0200

tr: fix "isdigit" check

Diffstat:
tr.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tr.c b/tr.c @@ -125,14 +125,13 @@ nextbrack: factor = 1; base = (rstr[i + 3] == '0') ? 8 : 10; for (n = j - 1; n > i + 2; n--) { - if (rstr[n] < '0' && rstr[n] > '9') { + if (rstr[n] < '0' || rstr[n] > '9') { n = 0; break; } q += (rstr[n] - '0') * factor; factor *= base; } - if (n == 0) { j = m + 1; goto nextbrack;