Skip to content

Commit

Permalink
liblv2 HLE: Fix sys_lwmutex_lock assertation
Browse files Browse the repository at this point in the history
  • Loading branch information
elad335 authored and Nekotekina committed Mar 23, 2020
1 parent 08e66ab commit 52360b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rpcs3/Emu/Cell/Modules/sys_lwmutex_.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ error_code sys_lwmutex_lock(ppu_thread& ppu, vm::ptr<sys_lwmutex_t> 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);
}
Expand Down Expand Up @@ -308,7 +308,7 @@ error_code sys_lwmutex_trylock(ppu_thread& ppu, vm::ptr<sys_lwmutex_t> 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);
}
Expand Down

0 comments on commit 52360b3

Please sign in to comment.