From 4c611f9323a516b95c3da19065e3f9040074de7e Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 14 Nov 2013 11:49:22 +0000 Subject: 31982: detection of floating point constants was problematic. Remove the cause and fix the original problem with floating point numbers with leading zeros (users/17445) a different way. --- Src/math.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'Src/math.c') diff --git a/Src/math.c b/Src/math.c index b21a3adee..42355f885 100644 --- a/Src/math.c +++ b/Src/math.c @@ -448,9 +448,7 @@ lexconstant(void) if (*nptr == '-') nptr++; - if (*nptr == '0' && - (memchr(nptr, '.', strlen(nptr)) == NULL)) - { + if (*nptr == '0') { nptr++; if (*nptr == 'x' || *nptr == 'X') { /* Let zstrtol parse number with base */ @@ -491,11 +489,8 @@ lexconstant(void) nptr = ptr2; } } - else - { - while (idigit(*nptr) || *nptr == '_') - nptr++; - } + while (idigit(*nptr) || *nptr == '_') + nptr++; if (*nptr == '.' || *nptr == 'e' || *nptr == 'E') { char *ptr2; -- cgit 1.4.1