diff --git a/codegen/luau/runtime/numeric_tb.lua b/codegen/luau/runtime/numeric_tb.lua index 91f33e6..c7775c2 100644 --- a/codegen/luau/runtime/numeric_tb.lua +++ b/codegen/luau/runtime/numeric_tb.lua @@ -31,7 +31,7 @@ function Numeric.into_u32(data) end 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 function Numeric.into_u64(value) diff --git a/codegen/luau/runtime/numeric_v3.lua b/codegen/luau/runtime/numeric_v3.lua index 82b4816..0f51d09 100644 --- a/codegen/luau/runtime/numeric_v3.lua +++ b/codegen/luau/runtime/numeric_v3.lua @@ -47,7 +47,7 @@ function Numeric.into_u32(value) end 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 function Numeric.into_u64(value)