From 0fb725b6c5bb72732a556214ef6df96f06fecc0c Mon Sep 17 00:00:00 2001 From: Zane van Iperen Date: Mon, 27 May 2024 19:37:32 +1000 Subject: [PATCH] core/math/fixed: fix BrFixedDiv() --- core/math/fixed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/math/fixed.c b/core/math/fixed.c index 06d73d52..764df2bd 100644 --- a/core/math/fixed.c +++ b/core/math/fixed.c @@ -108,7 +108,7 @@ br_fixed_ls BR_PUBLIC_ENTRY BrFixedDiv(br_fixed_ls numerator, br_fixed_ls denomi if(denominator == 0) return 0; - return (br_fixed_ls)(((br_uint_64)numerator << 16) / denominator); + return (br_fixed_ls)(((br_int_64)numerator << 16) / denominator); } br_fixed_ls BR_PUBLIC_ENTRY BrFixedRcp(br_fixed_ls a)