mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 19:45:20 +00:00
PPU: Fix access violation on logging
This commit is contained in:
parent
945bfaf0ea
commit
87f5368d3c
2 changed files with 11 additions and 1 deletions
|
@ -305,6 +305,16 @@ public:
|
|||
return addr + index * 8 + (is_code_addr ? 4 : 0);
|
||||
}
|
||||
|
||||
bool is_func(u32 cia) const
|
||||
{
|
||||
if (cia % 4 || !addr || cia < addr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return (cia - addr) / 8 < access().size();
|
||||
}
|
||||
|
||||
// Allocation address
|
||||
u32 addr = 0;
|
||||
|
||||
|
|
|
@ -2760,7 +2760,7 @@ void ppu_thread::fast_call(u32 addr, u64 rtoc, bool is_thread_entry)
|
|||
|
||||
const auto cia = _this->cia;
|
||||
|
||||
if (_this->current_function && vm::read32(cia) != ppu_instructions::SC(0))
|
||||
if (_this->current_function && g_fxo->get<ppu_function_manager>().is_func(cia))
|
||||
{
|
||||
return fmt::format("PPU[0x%x] Thread (%s) [HLE:0x%08x, LR:0x%08x]", _this->id, *name_cache.get(), cia, _this->lr);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue