Fix forwarding revert.

This commit is contained in:
chriseth
2021-04-29 14:58:10 +02:00
parent 850c25bf8e
commit b06a09fd82
+4 -2
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"(