mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-26 11:24:15 +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 {
|
try {
|
||||||
owner = GetHandle<KThread>(ownerHandle);
|
owner = GetHandle<KThread>(ownerHandle);
|
||||||
} catch (const std::out_of_range &) {
|
} catch (const std::out_of_range &) {
|
||||||
|
if (*mutex != (ownerHandle | HandleWaitersBit))
|
||||||
|
return result::InvalidCurrentMemory;
|
||||||
|
|
||||||
return result::InvalidHandle;
|
return result::InvalidHandle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user