aboutsummaryrefslogtreecommitdiffstats
path: root/libar2_decode_params.c
diff options
context:
space:
mode:
Diffstat (limited to 'libar2_decode_params.c')
-rw-r--r--libar2_decode_params.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libar2_decode_params.c b/libar2_decode_params.c
index 86fae6c..273de55 100644
--- a/libar2_decode_params.c
+++ b/libar2_decode_params.c
@@ -8,7 +8,7 @@ decode_u32(const char *s, uint_least32_t *outp)
uint_least32_t digit;
size_t i;
- if (s[0] == '0' || !isdigit(s[0])) {
+ if ((s[0] == '0' && isdigit(s[1])) || !isdigit(s[0])) {
errno = EINVAL;
return 0;
}