diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-07-14 22:11:00 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-07-14 22:11:00 -0400 |
commit | 47d027ee1a44829819c345287623fe75374893ab (patch) | |
tree | 6a44b7e7c915496ea8bbefa66c91c4db5e97afa0 /src/stdlib/strtoimax.c | |
parent | d3fd192523db544e6005051f224a2d7bafabedd9 (diff) | |
download | musl-47d027ee1a44829819c345287623fe75374893ab.tar.gz musl-47d027ee1a44829819c345287623fe75374893ab.tar.bz2 musl-47d027ee1a44829819c345287623fe75374893ab.tar.xz musl-47d027ee1a44829819c345287623fe75374893ab.zip |
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
Diffstat (limited to 'src/stdlib/strtoimax.c')
-rw-r--r-- | src/stdlib/strtoimax.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdlib/strtoimax.c b/src/stdlib/strtoimax.c index 247f91d4..671aa287 100644 --- a/src/stdlib/strtoimax.c +++ b/src/stdlib/strtoimax.c @@ -25,7 +25,7 @@ intmax_t strtoimax(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 ip.neg ? INTMAX_MIN : INTMAX_MAX; } |