mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-18 12:29:32 +08:00
* mingwex/strtold.c (__asctoe64): Set endptr to 'e' if exponent
string is not valid.
This commit is contained in:
parent
d8b84e4bc4
commit
d93998b17a
@ -1,3 +1,8 @@
|
||||
2005-02-01 Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
* mingwex/strtold.c (__asctoe64): Set endptr to 'e' if exponent
|
||||
string is not valid.
|
||||
|
||||
2005-01-26 Oliver Stoeneberg <oliverst@online.de>
|
||||
|
||||
* include/malloc.h: Add missing return code defines for
|
||||
|
@ -255,6 +255,8 @@ expnt:
|
||||
|
||||
esign = 1;
|
||||
exp = 0;
|
||||
/* Save position in case we need to fall back. */
|
||||
sp = s;
|
||||
++s;
|
||||
/* check for + or - */
|
||||
if( *s == '-' )
|
||||
@ -265,6 +267,13 @@ if( *s == '-' )
|
||||
if( *s == '+' )
|
||||
++s;
|
||||
|
||||
/* Check for valid exponent. */
|
||||
if (!(*s >= '0' && *s <= '9'))
|
||||
{
|
||||
s = sp;
|
||||
goto daldone;
|
||||
}
|
||||
|
||||
while( (*s >= '0') && (*s <= '9') )
|
||||
{
|
||||
/* Stop modifying exp if we are going to overflow anyway,
|
||||
|
Loading…
x
Reference in New Issue
Block a user