mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix source index allocation in CompilerStack. Depending on compiler(optimisations) this could be off-by-one.
This commit is contained in:
@@ -406,8 +406,9 @@ vector<string> CompilerStack::sourceNames() const
|
||||
map<string, unsigned> CompilerStack::sourceIndices() const
|
||||
{
|
||||
map<string, unsigned> indices;
|
||||
unsigned index = 0;
|
||||
for (auto const& s: m_sources)
|
||||
indices[s.first] = indices.size();
|
||||
indices[s.first] = index++;
|
||||
return indices;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user