Fixed issue: integer numbers could not be parsed as float

This commit is contained in:
Andrea Ferretti 2016-07-08 11:35:31 +02:00
parent dcdb04b79d
commit e33af48217
1 changed files with 14 additions and 12 deletions

View File

@ -142,6 +142,8 @@ proc constructObject*[T: float|float32|float64](
case hint
of yTypeFloat:
discard parseBiggestFloat(item.scalarContent, result)
of yTypeInteger:
discard parseBiggestFloat(item.scalarContent, result)
of yTypeFloatInf:
if item.scalarContent[0] == '-': result = NegInf
else: result = Inf