From 3d383c8037b78d59c83881a44cf3ebe2376a7a59 Mon Sep 17 00:00:00 2001 From: andreivladbrg Date: Mon, 27 Mar 2023 16:37:55 +0300 Subject: [PATCH] fix: bit mask in exp2 function --- src/Common.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common.sol b/src/Common.sol index ae4394f0..cae22295 100644 --- a/src/Common.sol +++ b/src/Common.sol @@ -170,7 +170,7 @@ function exp2(uint256 x) pure returns (uint256 result) { } } - if (x & 0xFF00000000 > 0) { + if (x & 0xFF000000 > 0) { if (x & 0x80000000 > 0) { result = (result * 0x10000000058B90BFC) >> 64; }