diff options
Diffstat (limited to 'libsolidity/analysis/ReferencesResolver.cpp')
-rw-r--r-- | libsolidity/analysis/ReferencesResolver.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libsolidity/analysis/ReferencesResolver.cpp b/libsolidity/analysis/ReferencesResolver.cpp index 2b40b4fd..a8231b13 100644 --- a/libsolidity/analysis/ReferencesResolver.cpp +++ b/libsolidity/analysis/ReferencesResolver.cpp @@ -176,11 +176,11 @@ bool ReferencesResolver::visit(InlineAssembly const& _inlineAssembly) if (!declarations.empty()) // the special identifier exists itself, we should not allow that. return size_t(-1); - string realName = _identifier.name.substr(0, - _identifier.name.size() - isSlot ? + string realName = _identifier.name.substr(0, _identifier.name.size() - ( + isSlot ? string("_slot").size() : string("_offset").size() - ); + )); declarations = m_resolver.nameFromCurrentScope(realName); } if (declarations.size() != 1) |