mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #9020 from ethereum/fixMemoryAssumption
Fix assumption for member not in memory.
This commit is contained in:
commit
f94ad21ef5
@ -1667,8 +1667,10 @@ string YulUtilFunctions::allocateAndInitializeMemoryStructFunction(StructType co
|
||||
for (size_t i = 0; i < members.size(); ++i)
|
||||
{
|
||||
solAssert(members[i]->memoryHeadSize() == 32, "");
|
||||
solAssert(members[i]->dataStoredIn(DataLocation::Memory), "");
|
||||
memberParams[i]["zeroValue"] = zeroValueFunction(*members[i], false);
|
||||
memberParams[i]["zeroValue"] = zeroValueFunction(
|
||||
*TypeProvider::withLocationIfReference(DataLocation::Memory, members[i]),
|
||||
false
|
||||
);
|
||||
}
|
||||
templ("member", memberParams);
|
||||
return templ.render();
|
||||
|
Loading…
Reference in New Issue
Block a user