diff options
Diffstat (limited to 'libsolidity/inlineasm/AsmCodeGen.cpp')
-rw-r--r-- | libsolidity/inlineasm/AsmCodeGen.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libsolidity/inlineasm/AsmCodeGen.cpp b/libsolidity/inlineasm/AsmCodeGen.cpp index b8af9dc6..02d5ced0 100644 --- a/libsolidity/inlineasm/AsmCodeGen.cpp +++ b/libsolidity/inlineasm/AsmCodeGen.cpp @@ -251,11 +251,15 @@ public: void operator()(assembly::VariableDeclaration const& _varDecl) { int height = m_assembly.stackHeight(); + int expectedItems = _varDecl.variables.size(); boost::apply_visitor(*this, *_varDecl.value); - expectDeposit(1, height); - auto& var = boost::get<Scope::Variable>(m_scope.identifiers.at(_varDecl.variable.name)); - var.stackHeight = height; - var.active = true; + expectDeposit(expectedItems, height); + for (auto const& variable: _varDecl.variables) + { + auto& var = boost::get<Scope::Variable>(m_scope.identifiers.at(variable.name)); + var.stackHeight = height++; + var.active = true; + } } void operator()(assembly::Block const& _block) { |