aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/bb_strtonum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/bb_strtonum.c b/libbb/bb_strtonum.c
index 2185017b0..cb70f1053 100644
--- a/libbb/bb_strtonum.c
+++ b/libbb/bb_strtonum.c
@@ -81,7 +81,7 @@ long long FAST_FUNC bb_strtoll(const char *arg, char **endp, int base)
81 /* Check for the weird "feature": 81 /* Check for the weird "feature":
82 * a "-" string is apparently a valid "number" for strto[u]l[l]! 82 * a "-" string is apparently a valid "number" for strto[u]l[l]!
83 * It returns zero and errno is 0! :( */ 83 * It returns zero and errno is 0! :( */
84 first = (arg[0] != '-' ? arg[0] : arg[1]); 84 first = (arg[0] != '-' && arg[0] != '+' ? arg[0] : arg[1]);
85 if (!isalnum(first)) return ret_ERANGE(); 85 if (!isalnum(first)) return ret_ERANGE();
86 86
87 errno = 0; 87 errno = 0;