mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-04 23:35:12 +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