1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-26 04:32:35 +01:00

PPU/Debugger: Fix op_branch_targets

This commit is contained in:
Eladash 2023-08-08 09:48:12 +03:00 committed by Elad Ashkenazi
parent cdc0441405
commit df24305698
2 changed files with 2 additions and 4 deletions

View File

@ -1206,9 +1206,7 @@ std::array<u32, 2> op_branch_targets(u32 pc, ppu_opcode_t op)
{
std::array<u32, 2> res{pc + 4, umax};
g_fxo->need<ppu_far_jumps_t>();
if (u32 target = g_fxo->get<ppu_far_jumps_t>().get_target(pc))
if (u32 target = g_fxo->is_init<ppu_far_jumps_t>() ? g_fxo->get<ppu_far_jumps_t>().get_target(pc) : 0)
{
res[0] = target;
return res;

View File

@ -347,7 +347,7 @@ namespace stx
}
// Check if object is not initialized but shall be initialized first (to use in initializing other objects)
template <typename T>
template <typename T> requires (std::is_constructible_v<T, manual_typemap&> || std::is_default_constructible_v<T>)
void need() noexcept
{
if (!m_init[stx::typeindex<typeinfo, std::decay_t<T>>()])