This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug stdio/15917] scanf %f doesn't parse "0e+0" correctly
- From: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sun, 01 Sep 2013 03:42:09 +0000
- Subject: [Bug stdio/15917] scanf %f doesn't parse "0e+0" correctly
- Auto-submitted: auto-generated
- References: <bug-15917-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=15917
Rich Felker <bugdal at aerifal dot cx> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugdal at aerifal dot cx
--- Comment #2 from Rich Felker <bugdal at aerifal dot cx> ---
I'm confused why this issue even happened, since parsing of hex floats should
be completely separate from parsing of decimal floats (the allowed forms are
sufficiently different, not to mention the computations to compute the values
to store). I guess the leading 0 is already eaten before it's determined that
the input is not hex.
Anyway, 0xe+0 is not nonsense, but parsing of course should stop just before
the plus sign. Also, it should be noted that 0x.e+0 is invalid for scanf but
valid for strtod (here, strtod only reads the first character).
--
You are receiving this mail because:
You are on the CC list for the bug.