Skip to content

Commit

Permalink
Update contracts/utils/structs/MerkleTree.sol
Browse files Browse the repository at this point in the history
Co-authored-by: Ernesto García <ernestognw@gmail.com>
  • Loading branch information
Amxx and ernestognw authored Feb 7, 2024
1 parent a3a813c commit ec05d19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/utils/structs/MerkleTree.sol
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ library MerkleTree {
uint256 leafIndex = self.nextLeafIndex++;

// Check if tree is full.
if (leafIndex == 1 << depth) Panic.panic(Panic.RESOURCE_ERROR);
if (leafIndex >= 1 << depth) Panic.panic(Panic.RESOURCE_ERROR);

// Rebuild branch from leaf to root
uint256 currentIndex = leafIndex;
Expand Down

0 comments on commit ec05d19

Please sign in to comment.