aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index 1f0da6a..a8af373 100644
--- a/src/util.c
+++ b/src/util.c
@@ -37,7 +37,7 @@ tollu(const char *s, unsigned long long int min, unsigned long long int max, uns
return -1;
}
if (!isdigit(s[*s == 'x' || *s == 'X' || *s == '#']) ||
- (*s == '0' && !isdigit(s[1 + (*s == 'x' || *s == 'o' || *s == 'b')]))) {
+ (*s == '0' && s[1] && !isdigit(s[1 + (*s == 'x' || *s == 'o' || *s == 'b')]))) {
errno = EINVAL;
return -1;
}