mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Avoid a possibility of fatal signal on non-Windows
This commit is contained in:
1 parent
799c721fa6
commit
ee2a24b19a
1 file changed
+7
@@ -303,6 +303,13 @@ int IsSocketReady(int fd, bool readfd, bool writefd, int* errorcode, int timeout
|
||||
*errorcode = EBADF;
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
#if !defined(_WIN32)
|
||||
if (fd >= FD_SETSIZE) {
|
||||
if (errorcode != nullptr)
|
||||
*errorcode = EBADF;
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
#endif
|
||||
|
||||
FD_ZERO(&readfds);
|
||||
writefds = readfds;
|
||||
|
||||
Reference in new issue
Block a user