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)
return Whiskers(R"(
function <functionName>() {
returndatacopy(0, 0, returndatasize())
revert(0, returndatasize())
let pos := <allocateUnbounded>()
returndatacopy(pos, 0, returndatasize())
revert(pos, returndatasize())
}
)")
("functionName", functionName)
("allocateUnbounded", allocateUnboundedFunction())
.render();
else
return Whiskers(R"(