diff options
author | Christian <c@ethdev.com> | 2014-12-03 00:53:25 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-12-03 00:58:44 +0800 |
commit | 24f3a4a2ea22d4b9a6098a86016f1c5edfbd714d (patch) | |
tree | 63c599c5a7025936c2a6b10b324c8f0538584230 /Types.cpp | |
parent | 3fc2708d657525162567b663a07cf8cb5b1c59aa (diff) | |
download | dexon-solidity-24f3a4a2ea22d4b9a6098a86016f1c5edfbd714d.tar.gz dexon-solidity-24f3a4a2ea22d4b9a6098a86016f1c5edfbd714d.tar.zst dexon-solidity-24f3a4a2ea22d4b9a6098a86016f1c5edfbd714d.zip |
Fix: Storage offset of first struct member should be zero.
Diffstat (limited to 'Types.cpp')
-rw-r--r-- | Types.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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.")); } |