This commit is contained in:
Ricardo Guilherme Schmidt 2018-03-28 18:37:17 -03:00
parent 27d0fc24b6
commit 497076382b
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ contract Factory is Controlled {
// by using o_code = new bytes(size) // by using o_code = new bytes(size)
o_code := mload(0x40) o_code := mload(0x40)
// new "memory end" including padding // new "memory end" including padding
mstore(0x40, add(o_code, and(add(add(size, 0x20), 0x1f), bnot(0x1f)))) mstore(0x40, add(o_code, and(add(add(size, 0x20), 0x1f), not(0x1f))))
// store length in memory // store length in memory
mstore(o_code, size) mstore(o_code, size)
// actually retrieve the code, this needs assembly // actually retrieve the code, this needs assembly