toml: fix decoding most large number values (#12541)
parent
3f0e532660
commit
e9efed02f0
|
@ -182,7 +182,7 @@ pub fn (n Number) i64() i64 {
|
||||||
bin := n.text.all_after('0b').replace('_', '')
|
bin := n.text.all_after('0b').replace('_', '')
|
||||||
return strconv.parse_int(bin, 2, 64) or { i64(0) }
|
return strconv.parse_int(bin, 2, 64) or { i64(0) }
|
||||||
}
|
}
|
||||||
return strconv.parse_int(n.text, 0, 0) or { i64(0) }
|
return strconv.parse_int(n.text, 0, 64) or { i64(0) }
|
||||||
}
|
}
|
||||||
|
|
||||||
// f64 returns the `n Number` as an `f64` value.
|
// f64 returns the `n Number` as an `f64` value.
|
||||||
|
|
|
@ -16,7 +16,7 @@ const (
|
||||||
|
|
||||||
valid_value_exceptions = [
|
valid_value_exceptions = [
|
||||||
// Integer
|
// Integer
|
||||||
'integer/long.toml',
|
'integer/long.toml', // TODO awaits BUG fix with strconv.parse_int('-9223372036854775808')
|
||||||
// Float
|
// Float
|
||||||
'float/inf-and-nan.toml',
|
'float/inf-and-nan.toml',
|
||||||
// Table
|
// Table
|
||||||
|
|
Loading…
Reference in New Issue