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):
|
||||
let hint = guessType(item.scalarContent)
|
||||
case hint
|
||||
of yTypeFloat: result = T(parseBiggestFloat(item.scalarContent))
|
||||
of yTypeFloat:
|
||||
discard parseBiggestFloat(item.scalarContent, result)
|
||||
of yTypeFloatInf:
|
||||
if item.scalarContent[0] == '-': result = NegInf
|
||||
else: result = Inf
|
||||
|
@ -877,4 +878,4 @@ proc dump*[K](value: K, target: Stream, tagStyle: TagStyle = tsRootOnly,
|
|||
try: present(events, target, serializationTagLibrary, options)
|
||||
except YamlStreamError:
|
||||
# serializing object does not raise any errors, so we can ignore this
|
||||
assert false, "Can never happen"
|
||||
assert false, "Can never happen"
|
||||
|
|
Loading…
Reference in New Issue