Core: Handle duplicate symbols in AddLabelSymbol

This commit is contained in:
zilmar 2024-11-07 13:37:10 +10:30
parent 72e6ee1a2b
commit f63244cfa4
1 changed files with 8 additions and 1 deletions

View File

@ -900,9 +900,16 @@ void CX86Ops::AddLabelSymbol(const asmjit::Label & Label, const char * Symbol)
{
NumberSymbolMap::iterator itr = m_LabelSymbols.find(Label.id());
if (itr != m_LabelSymbols.end())
{
if (strcmp(itr->second.Symbol.c_str(), Symbol) == 0)
{
itr->second.Count += 2;
}
else
{
__debugbreak();
}
}
else
{
m_LabelSymbols.emplace(std::make_pair(Label.id(), NumberSymbol{Symbol, 2}));