mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Properly offset jumpdests
This commit is contained in:
parent
fe5fda93fc
commit
aeb58ee5b9
@ -680,7 +680,7 @@ LinkerObject const& Assembly::assemble(bool eof) const
|
||||
size_t tagId = static_cast<size_t>(i.data());
|
||||
assertThrow(ret.bytecode.size() < 0xffffffffL, AssemblyException, "Tag too large.");
|
||||
assertThrow(m_tagPositionsInBytecode[tagId] == numeric_limits<size_t>::max(), AssemblyException, "Duplicate tag position.");
|
||||
m_tagPositionsInBytecode[tagId] = ret.bytecode.size();
|
||||
m_tagPositionsInBytecode[tagId] = ret.bytecode.size() - codeStart;
|
||||
ret.bytecode.push_back(static_cast<uint8_t>(Instruction::JUMPDEST));
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user