all repos — mgba @ 9f11bd8a161b5f37bdf7c69dc29f110b4ca87145

mGBA Game Boy Advance Emulator

Util: Fix highest-fd socket not being returned by SocketAccept
Vicki Pfau vi@endrift.com
Tue, 07 Feb 2017 13:19:45 -0800
commit

9f11bd8a161b5f37bdf7c69dc29f110b4ca87145

parent

5d485206052a9dad5f6cbe2279d81cc17fa1bf1e

2 files changed, 3 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -11,6 +11,7 @@ - Util: Fix overflow when loading invalid UPS patches

- GB: Fix crash when patching ROMs - 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: - Qt: Improved HiDPI support - Feature: Support ImageMagick 7
M src/util/socket.hsrc/util/socket.h

@@ -291,10 +291,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;