aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Types.cpp')
-rw-r--r--Types.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Types.cpp b/Types.cpp
index b81fbbe3..7e07b116 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -295,9 +295,9 @@ u256 StructType::getStorageOffsetOfMember(string const& _name) const
u256 offset;
for (ASTPointer<VariableDeclaration> variable: m_struct.getMembers())
{
- offset += variable->getType()->getStorageSize();
if (variable->getName() == _name)
return offset;
+ offset += variable->getType()->getStorageSize();
}
BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Storage offset of non-existing member requested."));
}