mirror of
https://github.com/status-im/NimYAML.git
synced 2025-01-27 11:34:56 +00:00
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…
x
Reference in New Issue
Block a user