From 39f57a9c718159448b0f9df199c3a0a019f32ca2 Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 9 Dec 2015 17:53:15 +0100 Subject: Fix: Segfaults connected to paramater types. parameterTypes does not return by const reference anymore. --- libsolidity/codegen/ExpressionCompiler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libsolidity/codegen/ExpressionCompiler.cpp') diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index a090a28c..dcdab2a7 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -85,7 +85,7 @@ void ExpressionCompiler::appendStateVariableAccessor(VariableDeclaration const& CompilerContext::LocationSetter locationSetter(m_context, _varDecl); FunctionType accessorType(_varDecl); - TypePointers const& paramTypes = accessorType.parameterTypes(); + TypePointers paramTypes = accessorType.parameterTypes(); // retrieve the position of the variable auto const& location = m_context.storageLocationOfVariable(_varDecl); @@ -380,7 +380,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall) else functionType = dynamic_pointer_cast(_functionCall.expression().annotation().type); - TypePointers const& parameterTypes = functionType->parameterTypes(); + TypePointers parameterTypes = functionType->parameterTypes(); vector> const& callArguments = _functionCall.arguments(); vector> const& callArgumentNames = _functionCall.names(); if (!functionType->takesArbitraryParameters()) -- cgit v1.2.3