fix(arc): assembler use after free (#125)

This commit is contained in:
Xenxo Espasandín 2023-05-19 13:02:07 +02:00 committed by GitHub
parent 5a144a3ba7
commit f0264876df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -245,8 +245,8 @@ auto assembler::assemble_function(function& func) -> void
if (itr != func.labels.end()) if (itr != func.labels.end())
{ {
func.labels.erase(old_idx);
func.labels.insert({ inst->index, itr->second }); func.labels.insert({ inst->index, itr->second });
func.labels.erase(old_idx);
} }
} }