Fix struct allocation in Sol->Yul.

This commit is contained in:
Daniel Kirchner
2020-06-11 12:16:45 +02:00
parent d4e3491f35
commit 73cd009b89
2 changed files with 22 additions and 2 deletions
+1 -2
View File
@@ -1652,8 +1652,7 @@ string YulUtilFunctions::allocateAndInitializeMemoryStructFunction(StructType co
return m_functionCollector.createFunction(functionName, [&]() {
Whiskers templ(R"(
function <functionName>() -> memPtr {
let allocSize := <allocSize>()
memPtr := <alloc>(allocSize)
memPtr := <alloc>(<allocSize>)
let offset := memPtr
<#member>
mstore(offset, <zeroValue>())