mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix revert with reason coming from a string variable
This commit is contained in:
1 parent
868d449c38
commit
c03a29dea8
4 files changed
+45
-2
No files matched your search
@@ -933,7 +933,11 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
|
||||
// condition was not met, flag an error
|
||||
m_context.appendInvalid();
|
||||
else if (arguments.size() > 1)
|
||||
{
|
||||
utils().revertWithStringData(*arguments.at(1)->annotation().type);
|
||||
// Here, the argument is consumed, but in the other branch, it is still there.
|
||||
m_context.adjustStackOffset(arguments.at(1)->annotation().type->sizeOnStack());
|
||||
}
|
||||
else
|
||||
m_context.appendRevert();
|
||||
// the success branch
|
||||
|
||||
Reference in new issue
Block a user