diff options
author | Mattias Andrée <maandree@kth.se> | 2022-02-17 17:11:55 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2022-02-17 17:11:55 +0100 |
commit | 4453280480a019c0fbe6d475deef0ecb918d2806 (patch) | |
tree | 9f9fed9fe371f2e1eb22c12c6a38d886ad5c5a5e /libar2_decode_params.c | |
parent | m + use optimisations '(adds auto-executed function: libar2_init)' (diff) | |
download | libar2-4453280480a019c0fbe6d475deef0ecb918d2806.tar.gz libar2-4453280480a019c0fbe6d475deef0ecb918d2806.tar.bz2 libar2-4453280480a019c0fbe6d475deef0ecb918d2806.tar.xz |
m + add tests for optimisations
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | libar2_decode_params.c | 2 |
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; } |