Skip to content

Commit

Permalink
Make boolToUint clean the upper bits
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeSandwich committed Feb 6, 2024
1 parent 45bbe87 commit c8e9e3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/utils/math/Math.sol
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ library Math {
function boolToUint(bool b) internal pure returns (uint256 u) {
/// @solidity memory-safe-assembly
assembly {
u := b
u := iszero(iszero(b))
}
}
}

0 comments on commit c8e9e3c

Please sign in to comment.