Closed Lruquaf closed 1 year ago
The conversion and cleaning is required for the assembly.
function testCleanAddress(uint256 x) public {
address from = address(uint160(x));
// If you comment out this line, the function will revert.
from = address(uint160(uint256(uint160(from)) & 0x00ffffffffffffffffffffffffffffffffffffffff));
assembly {
if shr(160, from) { revert(0, 0) }
}
}
Thank you!
Is there a redundant convertion on L552?