From 596ed77be48838b10364b7eda1a4f4a4970c0cad Mon Sep 17 00:00:00 2001 From: Adrien Husson Date: Sat, 11 Nov 2023 00:34:19 +0100 Subject: [PATCH] fix: re-fix comment (chainsec 5.1.1) (#655) --- lib/core/TickTreeLib.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/TickTreeLib.sol b/lib/core/TickTreeLib.sol index c0bf19b6c..72d7bc932 100644 --- a/lib/core/TickTreeLib.sol +++ b/lib/core/TickTreeLib.sol @@ -149,7 +149,7 @@ library LeafLib { Explanation: Note that unlike in fields, have their low bin on the most significant bits. - `pos` is initially 1 if `leaf` has some nonzero bit in its MSB half, 0 otherwise. Then `pos` is `A | B`, where `A` is `iszero(pos)<<1`, so `A` is 0 if leaf has some nonzero bit in its MSB half, 2 otherwise. And `B` is 0 if `leaf >> (pos << 7)` has some nonzero bit in its most significant 192 bits, 0 otherwise. + `pos` is initially 1 if `leaf` has some nonzero bit in its MSB half, 0 otherwise. Then `pos` is `A | B`, where `A` is `iszero(pos)<<1`, so `A` is 0 if leaf has some nonzero bit in its MSB half, 2 otherwise. And `B` is 0 if `leaf >> (pos << 7)` has some nonzero bit in its most significant 192 bits, 1 otherwise. */ function bestNonEmptyBinPos(Leaf leaf) internal pure returns (uint pos) { assembly("memory-safe") {