diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index b54779bdd1..e378991d2a 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -78,7 +78,7 @@ void fmt_class_string::format(std::string& out, u64 arg) case ppu_join_status::detached: return "detached"; case ppu_join_status::zombie: return "zombie"; case ppu_join_status::exited: return "exited"; - case ppu_join_status::max: return "invalid"; + case ppu_join_status::max: break; } return unknown; diff --git a/rpcs3/Emu/Cell/PPUThread.h b/rpcs3/Emu/Cell/PPUThread.h index 418e8fe246..b2799490c6 100644 --- a/rpcs3/Emu/Cell/PPUThread.h +++ b/rpcs3/Emu/Cell/PPUThread.h @@ -203,7 +203,7 @@ public: static void stack_pop_verbose(u32 addr, u32 size) noexcept; }; -static_assert(ppu_join_status::max < ppu_join_status{ppu_thread::id_base}); +static_assert(ppu_join_status::max <= ppu_join_status{ppu_thread::id_base}); template struct ppu_gpr_cast_impl diff --git a/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp b/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp index b99a8b6f59..a0f88420a0 100644 --- a/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp @@ -60,7 +60,7 @@ void _sys_ppu_thread_exit(ppu_thread& ppu, u64 errorcode) status = ppu_join_status::exited; }); - if (old_status > ppu_join_status::max) + if (old_status >= ppu_join_status::max) { lv2_obj::append(idm::check_unlocked>(static_cast(old_status))); } @@ -114,7 +114,7 @@ error_code sys_ppu_thread_join(ppu_thread& ppu, u32 thread_id, vm::ptr vptr return CELL_ESRCH; } - if (value > ppu_join_status::max) + if (value >= ppu_join_status::max) { return CELL_EINVAL; } @@ -191,7 +191,7 @@ error_code sys_ppu_thread_detach(u32 thread_id) return CELL_EINVAL; } - if (value > ppu_join_status::max) + if (value >= ppu_join_status::max) { return CELL_EBUSY; }