Skip to content
Snippets Groups Projects
Commit d548839a authored by Mark Olesen's avatar Mark Olesen
Browse files

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.
parent 8a884892
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment