diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/sleigh_arch.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/sleigh_arch.cc index f628a6ff19..cb0848a4de 100644 --- a/Ghidra/Features/Decompiler/src/decompile/cpp/sleigh_arch.cc +++ b/Ghidra/Features/Decompiler/src/decompile/cpp/sleigh_arch.cc @@ -181,8 +181,9 @@ Translate *SleighArchitecture::buildTranslator(DocumentStorage &store) iter->second.reset(loader, context); return &iter->second; } - translators[languageindex] = Sleigh(loader,context); - return &translators[languageindex]; + pair::iterator,bool> res; + res = translators.emplace(piecewise_construct,forward_as_tuple(languageindex),forward_as_tuple(loader,context)); + return &(*res.first).second; } PcodeInjectLibrary *SleighArchitecture::buildPcodeInjectLibrary(void)