diff options
-rw-r--r-- | libsolidity/analysis/ReferencesResolver.cpp | 6 | ||||
-rw-r--r-- | libsolidity/codegen/ContractCompiler.cpp | 2 |
2 files changed, 4 insertions, 4 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) diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp index 7e0be4cb..1794cc23 100644 --- a/libsolidity/codegen/ContractCompiler.cpp +++ b/libsolidity/codegen/ContractCompiler.cpp @@ -599,7 +599,7 @@ bool ContractCompiler::visit(InlineAssembly const& _inlineAssembly) } else solAssert(false, "Invalid declaration type."); - solAssert(_assembly.deposit() - depositBefore == ref->second.valueSize, ""); + solAssert(_assembly.deposit() - depositBefore == int(ref->second.valueSize), ""); } else { |