mirror of https://github.com/status-im/NimYAML.git
Fixed issue: integer numbers could not be parsed as float
This commit is contained in:
parent
dcdb04b79d
commit
e33af48217
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue