back to the roots with tokenizing numbers
- since atof is just a call to strtod (in glibc at least), revert to the original character collection, convert the number via strtod/strtol and check the end pointer so see if everything was converted. Flag both bad formats (eg, ".e") and trailing junk (eg, "1.e4e") as a tokenize error. These were previously silently ignored. - simple (same weight as before), but with trivial error checking. Retain buffer overflow check.
Please register or sign in to comment