This is a bug fix which prevents parseFloat from proceeding past

multiple decimals '.' in the stream. Only one can be accepted for
valid decimal numbers.
This commit is contained in:
Chris--A 2015-06-19 13:07:35 +10:00 committed by Sandeep Mistry
parent 29e1dbb8be
commit 475bcd1d4f
1 changed files with 1 additions and 1 deletions

View File

@ -185,7 +185,7 @@ float Stream::parseFloat(char skipChar){
read(); // consume the character we got with peek
c = timedPeek();
}
while( (c >= '0' && c <= '9') || c == '.' || c == skipChar );
while( (c >= '0' && c <= '9') || c == '.' && !isFraction || c == skipChar );
if(isNegative)
value = -value;