From 47d027ee1a44829819c345287623fe75374893ab Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 14 Jul 2011 22:11:00 -0400 Subject: fix various bugs in new integer parser framework 1. my interpretation of subject sequence definition was wrong. adjust parser to conform to the standard. 2. some code for handling tail overflow case was missing (forgot to finish writing it). 3. typo (= instead of ==) caused ERANGE to wrongly behave like EINVAL --- src/stdlib/strtoumax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stdlib/strtoumax.c') diff --git a/src/stdlib/strtoumax.c b/src/stdlib/strtoumax.c index a2bb4d7d..a299dc04 100644 --- a/src/stdlib/strtoumax.c +++ b/src/stdlib/strtoumax.c @@ -26,7 +26,7 @@ uintmax_t strtoumax(const char *s1, char **p, int base) if (ip.err) { errno = ip.err; - if (ip.err = EINVAL) return 0; + if (ip.err == EINVAL) return 0; return UINTMAX_MAX; } -- cgit v1.2.1