prevent HANDLE_INVALID_VALUE being handled as an EmuHandle
This commit is contained in:
parent
ce3ab7e945
commit
a5e350b0d1
|
@ -136,6 +136,12 @@ EmuNtObject* EmuNtObject::NtDuplicateObject(DWORD Options)
|
|||
|
||||
bool IsEmuHandle(HANDLE Handle)
|
||||
{
|
||||
// HACK: Return false for invalid handles (HANDLE INVALID VALUE)
|
||||
// TODO: Find out where invalid handles are coming from!
|
||||
if (Handle == (HANDLE)-1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (uint32_t)Handle > 0x80000000;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue