Util: Fix highest-fd socket not being returned by SocketAccept
Vicki Pfau vi@endrift.com
Tue, 07 Feb 2017 13:19:45 -0800
2 files changed,
3 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -25,6 +25,7 @@ - GBA Savedata: Fix savedata unmasking (fixes mgba.io/i/441)
- Util: Fix overflow when loading invalid UPS patches - Tools: Fix recurring multiple times over the same library - GBA I/O: Handle audio registers specially when deserializing + - Util: Fix highest-fd socket not being returned by SocketAccept Misc: - SDL: Remove scancode key input - GBA Video: Clean up unused timers
M
include/mgba-util/socket.h
→
include/mgba-util/socket.h
@@ -293,10 +293,11 @@ FD_SET(errors[i], &eset);
errors[i] = INVALID_SOCKET; } } + ++maxFd; struct timeval tv; tv.tv_sec = timeoutMillis / 1000; tv.tv_usec = (timeoutMillis % 1000) * 1000; - int result = select(maxFd + 1, &rset, &wset, &eset, timeoutMillis < 0 ? 0 : &tv); + int result = select(maxFd, &rset, &wset, &eset, timeoutMillis < 0 ? 0 : &tv); int r = 0; int w = 0; int e = 0;