summaryrefslogtreecommitdiff
path: root/libfetch/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'libfetch/common.c')
-rw-r--r--libfetch/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libfetch/common.c b/libfetch/common.c
index 0a51c26..4a6b867 100644
--- a/libfetch/common.c
+++ b/libfetch/common.c
@@ -181,7 +181,7 @@ fetch_parseuint(const char *str, const char **endptr, int radix, uintmax_t max)
unsigned char ch = (unsigned char)*p;
if (isdigit(ch))
d = ch - '0';
- else d = tolower(ch - 'a');
+ else d = tolower(ch) - 'a' + 10;
if (d > radix || val > maxx) goto err;
val *= radix;
if (val > max-d) goto err;