We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88dd74a commit 0471ff4Copy full SHA for 0471ff4
source/contracts/libraries/Delegator.sol
@@ -24,13 +24,7 @@ contract Delegator is DelegationTarget {
24
//0x40 is the address where the next free memory slot is stored in Solidity
25
let _calldataMemoryOffset := mload(0x40)
26
// Update the pointer at 0x40 to point at new free memory location so any theoretical allocation doesn't stomp our memory in this call
27
- let _size := 0
28
- switch gt(calldatasize, 32)
29
- case 1 {
30
- _size := calldatasize
31
- } default {
32
- _size := 32
33
- }
+ let _size := and(add(calldatasize, 0x1f), not(0x1f))
34
mstore(0x40, add(_calldataMemoryOffset, _size))
35
// Copy method signature and parameters of this call into memory
36
calldatacopy(_calldataMemoryOffset, 0x0, calldatasize)
0 commit comments