From 87c25490c8e1beb3ccb5c65c5fd414c410695403 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Wed, 28 Nov 2001 06:06:27 +0000 Subject: Don't ever assume that isdigit() is always subset of isxdigit() --- lib/libc/stdlib/strtoull.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libc/stdlib/strtoull.c') diff --git a/lib/libc/stdlib/strtoull.c b/lib/libc/stdlib/strtoull.c index adb655681da9..34678fe64089 100644 --- a/lib/libc/stdlib/strtoull.c +++ b/lib/libc/stdlib/strtoull.c @@ -90,7 +90,7 @@ strtoull(nptr, endptr, base) cutoff = ULLONG_MAX / base; cutlim = ULLONG_MAX % base; for ( ; ; c = *s++) { - if (isxdigit(c)) + if (isdigit(c) || (base == 16 && isxdigit(c))) c = digittoint(c); else if (isascii(c) && isalpha(c)) c -= isupper(c) ? 'A' - 10 : 'a' - 10; -- cgit v1.2.3