mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-19 04:49:25 +08:00
stdio: Parse 0x0p+00 correctly in scanf
The scanf code was skipping the '0' after the 'x' causing the resulting buffer to contain an invalid number when passed to strtod. Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
90a72f27d5
commit
92068f4cc5
@ -1628,6 +1628,7 @@ __SVFSCANF_R (struct _reent *rptr,
|
||||
&& zeroes == 1)
|
||||
{
|
||||
flags |= HEXFLT;
|
||||
flags &= ~NDIGITS;
|
||||
/* We skipped the first zero, so we have to add
|
||||
it now to the buffer. */
|
||||
*p++ = '0';
|
||||
|
Loading…
x
Reference in New Issue
Block a user