Fix large integer initialization
This commit is contained in:
@@ -31,7 +31,7 @@ function Numeric.into_u32(data)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Numeric.from_u64(value)
|
function Numeric.from_u64(value)
|
||||||
return from_u32(bit_and(value), bit_and(value / 0x100000000))
|
return from_u32(bit_and(value % 0x100000000), bit_and(value / 0x100000000))
|
||||||
end
|
end
|
||||||
|
|
||||||
function Numeric.into_u64(value)
|
function Numeric.into_u64(value)
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ function Numeric.into_u32(value)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Numeric.from_u64(value)
|
function Numeric.from_u64(value)
|
||||||
return from_u32(bit_and(value), bit_and(value / 0x100000000))
|
return from_u32(bit_and(value % 0x100000000), bit_and(value / 0x100000000))
|
||||||
end
|
end
|
||||||
|
|
||||||
function Numeric.into_u64(value)
|
function Numeric.into_u64(value)
|
||||||
|
|||||||
Reference in New Issue
Block a user