diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 2005-01-21 00:42:13 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 2005-01-21 00:42:13 +0000 |
| commit | 2571c7f7200f06b1055c8360f17a9a0f4eca06f4 (patch) | |
| tree | d24a817d276208fdac47a21499eab3278d2f86ba /lib/libc/stdlib/strtoull.c | |
| parent | f3f82767324f6ebd66e0bfc06f419553b022e564 (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdlib/strtoull.c')
| -rw-r--r-- | lib/libc/stdlib/strtoull.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libc/stdlib/strtoull.c b/lib/libc/stdlib/strtoull.c index 1720a8f6571c..0e80b0d51295 100644 --- a/lib/libc/stdlib/strtoull.c +++ b/lib/libc/stdlib/strtoull.c @@ -73,7 +73,11 @@ strtoull(const char * __restrict nptr, char ** __restrict endptr, int base) c = *s++; } if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) { + c == '0' && (*s == 'x' || *s == 'X') && + ((s[1] >= 'a' && s[1] <= 'f') || + (s[1] >= 'A' && s[1] <= 'F') || + (s[1] >= '0' && s[1] <= '9')) + ) { c = s[1]; s += 2; base = 16; |
