diff options
Diffstat (limited to 'libsolidity/inlineasm/AsmParser.cpp')
-rw-r--r-- | libsolidity/inlineasm/AsmParser.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libsolidity/inlineasm/AsmParser.cpp b/libsolidity/inlineasm/AsmParser.cpp index 85ae9424..519bfa2e 100644 --- a/libsolidity/inlineasm/AsmParser.cpp +++ b/libsolidity/inlineasm/AsmParser.cpp @@ -321,6 +321,15 @@ assembly::Statement Parser::parseCall(assembly::Statement&& _instruction) unsigned args = unsigned(instrInfo.args); for (unsigned i = 0; i < args; ++i) { + /// check for premature closing parentheses + if (m_scanner->currentToken() == Token::RParen) + fatalParserError(string( + "Expected " + + boost::lexical_cast<string>(args) + + " arguments, but received " + + boost::lexical_cast<string>(i) + )); + ret.arguments.emplace_back(parseExpression()); if (i != args - 1) { |