Use free memory pointer for returndatacopy (#5057)
This commit is contained in:
@ -46,8 +46,9 @@ library Create2 {
|
||||
addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)
|
||||
// if no address was created, and returndata is not empty, bubble revert
|
||||
if and(iszero(addr), not(iszero(returndatasize()))) {
|
||||
returndatacopy(0, 0, returndatasize())
|
||||
revert(0, returndatasize())
|
||||
let p := mload(0x40)
|
||||
returndatacopy(p, 0, returndatasize())
|
||||
revert(p, returndatasize())
|
||||
}
|
||||
}
|
||||
if (addr == address(0)) {
|
||||
|
||||
Reference in New Issue
Block a user