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)
|
&& zeroes == 1)
|
||||||
{
|
{
|
||||||
flags |= HEXFLT;
|
flags |= HEXFLT;
|
||||||
|
flags &= ~NDIGITS;
|
||||||
/* We skipped the first zero, so we have to add
|
/* We skipped the first zero, so we have to add
|
||||||
it now to the buffer. */
|
it now to the buffer. */
|
||||||
*p++ = '0';
|
*p++ = '0';
|
||||||
|
|
Loading…
Reference in New Issue