Don't parse a single "e" or "E" as a numerical zero. You need a

numerical prefix to use the 1.0e12 notation, "e" alone is not enough.
This commit is contained in:
andy 2005-03-22 20:28:47 +00:00
parent 3ce0c17237
commit 3a8b431a5b

View File

@ -199,6 +199,9 @@ static int tonum(unsigned char* s, int len, double* result)
i += fraclen;
}
// Nothing so far? Then the parse failed.
if(i == 0) return 0;
// Read the exponent, if any
if(i < len && (s[i] == 'e' || s[i] == 'E'))
i = readsigned(s, len, i+1, &exp);