Fix forwarding revert.

This commit is contained in:
chriseth 2021-03-15 17:33:21 +01:00
parent 850c25bf8e
commit b06a09fd82

View File

@ -3792,11 +3792,13 @@ string YulUtilFunctions::forwardingRevertFunction()
if (forward) if (forward)
return Whiskers(R"( return Whiskers(R"(
function <functionName>() { function <functionName>() {
returndatacopy(0, 0, returndatasize()) let pos := <allocateUnbounded>()
revert(0, returndatasize()) returndatacopy(pos, 0, returndatasize())
revert(pos, returndatasize())
} }
)") )")
("functionName", functionName) ("functionName", functionName)
("allocateUnbounded", allocateUnboundedFunction())
.render(); .render();
else else
return Whiskers(R"( return Whiskers(R"(