mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-29 22:04:17 +01:00
Check the mutex tag in MutexLock if the given handle isn't found
Makes sure the correct error is reported as HOS only reports InvalidHandle if the tag matches.
This commit is contained in:
parent
476bb65f37
commit
99a839d669
@ -110,6 +110,9 @@ namespace skyline::kernel::type {
|
||||
try {
|
||||
owner = GetHandle<KThread>(ownerHandle);
|
||||
} catch (const std::out_of_range &) {
|
||||
if (*mutex != (ownerHandle | HandleWaitersBit))
|
||||
return result::InvalidCurrentMemory;
|
||||
|
||||
return result::InvalidHandle;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user