From 2d2ae3276a03936a2f9bfdf4b96d105020ab702c Mon Sep 17 00:00:00 2001 From: fallenoak Date: Mon, 6 Feb 2023 12:15:25 -0600 Subject: [PATCH] fix(big): calculate shift from divisor in Div --- storm/big/Ops.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storm/big/Ops.cpp b/storm/big/Ops.cpp index d1407ec..a64e4f5 100644 --- a/storm/big/Ops.cpp +++ b/storm/big/Ops.cpp @@ -76,7 +76,7 @@ void Div(BigBuffer& a, BigBuffer& b, const BigBuffer& c, const BigBuffer& d, Big auto& dd = stack.Alloc(&allocCount); auto& work = stack.Alloc(&allocCount); - uint32_t shift = 0x1F - (HighBitPos(work) & 0x1F); + uint32_t shift = 0x1F - (HighBitPos(d) & 0x1F); Shl(cc, c, shift); Shl(dd, d, shift);