diff options
| author | Léo Lam <leo@innovatetechnologi.es> | 2018-02-28 15:56:03 +0100 |
|---|---|---|
| committer | Léo Lam <leo@innovatetechnologi.es> | 2018-02-28 15:56:03 +0100 |
| commit | 4e014f996bd964a7cef79905187e003dae939f4e (patch) | |
| tree | 57b992f6eaa42cd5d31ea711ae5fe0118055bf0b /Source | |
| parent | bf825e635404c04e6098d4f8d8391d238d5c98ce (diff) | |
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.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/IOS/IOS.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Core/Core/IOS/IOS.cpp b/Source/Core/Core/IOS/IOS.cpp index 722af814f1..a41effe7b7 100644 --- a/Source/Core/Core/IOS/IOS.cpp +++ b/Source/Core/Core/IOS/IOS.cpp @@ -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; } |
