all repos — mgba @ b54a4ba555eaac0de79107db1c321c811980187c

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

b54a4ba555eaac0de79107db1c321c811980187c

parent

af96097bb1cb1a0d2683f831370caa40a96541db

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

jump to
M CHANGESCHANGES

@@ -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.hinclude/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;