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:
parent
3ce0c17237
commit
3a8b431a5b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user