PPU LLVM: Do not use possible duplicates in MSELF

This commit is contained in:
Eladash 2024-02-16 09:05:14 +02:00 committed by Elad.Ash
parent 27ea25a999
commit f943deb2c3

View File

@ -3798,8 +3798,21 @@ extern void ppu_precompile(std::vector<std::string>& dir_queue, std::vector<ppu_
{
mself_record rec{};
std::set<u64> offs;
if (mself.read(rec) && rec.get_pos(mself.size()))
{
if (rec.size <= 0x20)
{
continue;
}
if (!offs.emplace(rec.off).second)
{
// Duplicate
continue;
}
// Read characters safely
std::string name(sizeof(rec.name), '\0');