From ee65ecfb3b80d9c027bade21df883e897b1234c5 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 26 Sep 2017 22:46:33 +0100 Subject: Ensure that address types are always declared as 160bit --- libsolidity/codegen/ExpressionCompiler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libsolidity/codegen/ExpressionCompiler.cpp') diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index b286594a..58c64bce 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -1040,7 +1040,7 @@ bool ExpressionCompiler::visit(MemberAccess const& _memberAccess) identifier = FunctionType(*function).externalIdentifier(); else solAssert(false, "Contract member is neither variable nor function."); - utils().convertType(type, IntegerType(0, IntegerType::Modifier::Address), true); + utils().convertType(type, IntegerType(160, IntegerType::Modifier::Address), true); m_context << identifier; } else @@ -1057,7 +1057,7 @@ bool ExpressionCompiler::visit(MemberAccess const& _memberAccess) { utils().convertType( *_memberAccess.expression().annotation().type, - IntegerType(0, IntegerType::Modifier::Address), + IntegerType(160, IntegerType::Modifier::Address), true ); m_context << Instruction::BALANCE; @@ -1065,7 +1065,7 @@ bool ExpressionCompiler::visit(MemberAccess const& _memberAccess) else if ((set{"send", "transfer", "call", "callcode", "delegatecall"}).count(member)) utils().convertType( *_memberAccess.expression().annotation().type, - IntegerType(0, IntegerType::Modifier::Address), + IntegerType(160, IntegerType::Modifier::Address), true ); else -- cgit v1.2.3