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. --- solc/jsonCompiler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'solc/jsonCompiler.cpp') diff --git a/solc/jsonCompiler.cpp b/solc/jsonCompiler.cpp index cb3eeefd..a5d86aad 100644 --- a/solc/jsonCompiler.cpp +++ b/solc/jsonCompiler.cpp @@ -103,9 +103,9 @@ Json::Value estimateGas(CompilerStack const& _compiler, string const& _contract) gas = GasEstimator::functionalEstimation(*items, entry, *it); FunctionType type(*it); string sig = it->name() + "("; - auto end = type.parameterTypes().end(); - for (auto it = type.parameterTypes().begin(); it != end; ++it) - sig += (*it)->toString() + (it + 1 == end ? "" : ","); + auto paramTypes = type.parameterTypes(); + for (auto it = paramTypes.begin(); it != paramTypes.end(); ++it) + sig += (*it)->toString() + (it + 1 == paramTypes.end() ? "" : ","); sig += ")"; internalFunctions[sig] = gasToJson(gas); } -- cgit