mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
IOS: Fix invalid FD being returned after an open
Fixes a regression introduced by 80b1bf13c2
.
The return value for open replies should be overwritten with the new
file descriptor.
This commit is contained in:
parent
bf825e6354
commit
4e014f996b
@ -500,9 +500,12 @@ IPCCommandResult Kernel::OpenDevice(OpenRequest& request)
|
||||
return Device::Device::GetDefaultReply(IPC_ENOENT);
|
||||
}
|
||||
|
||||
const IPCCommandResult result = device->Open(request);
|
||||
IPCCommandResult result = device->Open(request);
|
||||
if (result.return_value >= IPC_SUCCESS)
|
||||
{
|
||||
m_fdmap[new_fd] = device;
|
||||
result.return_value = new_fd;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user