1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

json: fix json.decode bug for u64 values greater than 2^31 (#11238)

This commit is contained in:
Hualin Song
2021-08-20 14:14:55 +08:00
committed by GitHub
parent 1570e613b5
commit 4fb570522a
2 changed files with 12 additions and 1 deletions

View File

@ -96,7 +96,7 @@ fn decode_u64(root &C.cJSON) u64 {
if isnil(root) {
return u64(0)
}
return u64(root.valueint)
return u64(root.valuedouble)
}
fn decode_f32(root &C.cJSON) f32 {