mirror of https://github.com/status-im/NimYAML.git
Fixes #17
This commit is contained in:
parent
fb05fcc95f
commit
b01270dc9e
|
@ -140,7 +140,8 @@ proc constructObject*[T: float|float32|float64](
|
||||||
constructScalarItem(s, item, T):
|
constructScalarItem(s, item, T):
|
||||||
let hint = guessType(item.scalarContent)
|
let hint = guessType(item.scalarContent)
|
||||||
case hint
|
case hint
|
||||||
of yTypeFloat: result = T(parseBiggestFloat(item.scalarContent))
|
of yTypeFloat:
|
||||||
|
discard parseBiggestFloat(item.scalarContent, result)
|
||||||
of yTypeFloatInf:
|
of yTypeFloatInf:
|
||||||
if item.scalarContent[0] == '-': result = NegInf
|
if item.scalarContent[0] == '-': result = NegInf
|
||||||
else: result = Inf
|
else: result = Inf
|
||||||
|
|
Loading…
Reference in New Issue