From 52360b3f98fbe15af8dfd0cad3123b9e89253a67 Mon Sep 17 00:00:00 2001 From: Eladash Date: Mon, 23 Mar 2020 18:24:30 +0200 Subject: [PATCH] liblv2 HLE: Fix sys_lwmutex_lock assertation --- rpcs3/Emu/Cell/Modules/sys_lwmutex_.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/sys_lwmutex_.cpp b/rpcs3/Emu/Cell/Modules/sys_lwmutex_.cpp index ea7ba4ce1c..7c0755e10c 100644 --- a/rpcs3/Emu/Cell/Modules/sys_lwmutex_.cpp +++ b/rpcs3/Emu/Cell/Modules/sys_lwmutex_.cpp @@ -178,7 +178,7 @@ error_code sys_lwmutex_lock(ppu_thread& ppu, vm::ptr lwmutex, u64 // locking succeeded auto old = lwmutex->vars.owner.exchange(tid); - if (old != lwmutex_reserved) + if (old != lwmutex_reserved && old >> 24 != 1) { fmt::throw_exception("Locking failed (lwmutex=*0x%x, owner=0x%x)" HERE, lwmutex, old); } @@ -308,7 +308,7 @@ error_code sys_lwmutex_trylock(ppu_thread& ppu, vm::ptr lwmutex) // locking succeeded auto old = lwmutex->vars.owner.exchange(tid); - if (old != lwmutex_reserved) + if (old != lwmutex_reserved && old >> 24 != 1) { fmt::throw_exception("Locking failed (lwmutex=*0x%x, owner=0x%x)" HERE, lwmutex, old); }