mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
toml: fix decoding most large number values (#12541)
This commit is contained in:
parent
3f0e532660
commit
e9efed02f0
@ -182,7 +182,7 @@ pub fn (n Number) i64() i64 {
|
||||
bin := n.text.all_after('0b').replace('_', '')
|
||||
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.
|
||||
|
@ -16,7 +16,7 @@ const (
|
||||
|
||||
valid_value_exceptions = [
|
||||
// Integer
|
||||
'integer/long.toml',
|
||||
'integer/long.toml', // TODO awaits BUG fix with strconv.parse_int('-9223372036854775808')
|
||||
// Float
|
||||
'float/inf-and-nan.toml',
|
||||
// Table
|
||||
|
Loading…
Reference in New Issue
Block a user