summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorTillmann Karras <tilkax@gmail.com>2023-11-21 11:56:19 +0000
committerTillmann Karras <tilkax@gmail.com>2023-11-21 12:00:34 +0000
commit77a1eaa7403a4c332485fee1eb46f6cf156ffd07 (patch)
tree9abca8029e9bff5e17988e41f994717dd60263a6 /Source
parentf79c88f30b65a680f40cdc242205c315dba8d412 (diff)
IOS: fix crash when closing invalid file descriptor
This regression was introduced in 5.0-20284.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/IOS/IOS.cpp2
-rw-r--r--Source/Core/Core/IOS/IOS.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Core/IOS/IOS.cpp b/Source/Core/Core/IOS/IOS.cpp
index 8c08c64001..287e2bcc33 100644
--- a/Source/Core/Core/IOS/IOS.cpp
+++ b/Source/Core/Core/IOS/IOS.cpp
@@ -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];
diff --git a/Source/Core/Core/IOS/IOS.h b/Source/Core/Core/IOS/IOS.h
index 2133e155c8..4581e146c2 100644
--- a/Source/Core/Core/IOS/IOS.h
+++ b/Source/Core/Core/IOS/IOS.h
@@ -154,7 +154,7 @@ public:
// 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();