From 22d447395ba55f611b69336c5684d318c0ccda69 Mon Sep 17 00:00:00 2001 From: Rerumu Date: Sun, 26 Jun 2022 02:41:36 -0400 Subject: [PATCH] Fix `i64` division on zero shortcut --- codegen/luau/runtime/numeric.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codegen/luau/runtime/numeric.lua b/codegen/luau/runtime/numeric.lua index 4ea433b..ebca101 100644 --- a/codegen/luau/runtime/numeric.lua +++ b/codegen/luau/runtime/numeric.lua @@ -187,7 +187,7 @@ function Numeric.divide_unsigned(lhs, rhs) if num_is_zero(rhs) then error("division by zero") elseif num_is_zero(lhs) then - return 0 + return K_ZERO end local rhs_number = into_u64(rhs)