Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #12309 from Tilka/ios_crash
IOS: fix crash when closing invalid file descriptor
  • Loading branch information
Tilka committed Nov 21, 2023
2 parents f79c88f + 77a1eaa commit 3a3a935
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/Core/Core/IOS/IOS.cpp
Expand Up @@ -654,7 +654,7 @@ std::shared_ptr<Device> EmulationKernel::GetDeviceByName(std::string_view device
return iterator != m_device_map.end() ? iterator->second : nullptr;
}

std::shared_ptr<Device> EmulationKernel::GetDeviceByFileDescriptor(const int fd)
std::shared_ptr<Device> EmulationKernel::GetDeviceByFileDescriptor(const u32 fd)
{
if (fd < IPC_MAX_FDS)
return m_fdmap[fd];
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/IOS/IOS.h
Expand Up @@ -154,7 +154,7 @@ class EmulationKernel final : public Kernel
// Get a resource manager by name.
// This only works for devices which are part of the device map.
std::shared_ptr<Device> GetDeviceByName(std::string_view device_name);
std::shared_ptr<Device> GetDeviceByFileDescriptor(const int fd);
std::shared_ptr<Device> GetDeviceByFileDescriptor(const u32 fd);

std::shared_ptr<FSDevice> GetFSDevice();
std::shared_ptr<ESDevice> GetESDevice();
Expand Down

0 comments on commit 3a3a935

Please sign in to comment.