mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-06 08:09:19 +00:00
Merge pull request #6412 from leoetlino/oops
IOS: Fix invalid FD being returned after an open
This commit is contained in:
commit
82b87b0d4c
1 changed files with 4 additions and 1 deletions
|
@ -500,9 +500,12 @@ IPCCommandResult Kernel::OpenDevice(OpenRequest& request)
|
||||||
return Device::Device::GetDefaultReply(IPC_ENOENT);
|
return Device::Device::GetDefaultReply(IPC_ENOENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
const IPCCommandResult result = device->Open(request);
|
IPCCommandResult result = device->Open(request);
|
||||||
if (result.return_value >= IPC_SUCCESS)
|
if (result.return_value >= IPC_SUCCESS)
|
||||||
|
{
|
||||||
m_fdmap[new_fd] = device;
|
m_fdmap[new_fd] = device;
|
||||||
|
result.return_value = new_fd;
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue