diff options
author | thilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2009-06-05 18:54:47 +0000 |
---|---|---|
committer | thilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2009-06-05 18:54:47 +0000 |
commit | 9d6b8d348463a0b89d001f649fe65f966ba486b5 (patch) | |
tree | bdf3fd9944bdda2e58e858db6209c17e5de62402 /code/qcommon | |
parent | 799f155f23a3dcbe32089d18b1bb8150648f4192 (diff) | |
download | ioquake3-aero-9d6b8d348463a0b89d001f649fe65f966ba486b5.tar.gz ioquake3-aero-9d6b8d348463a0b89d001f649fe65f966ba486b5.zip |
Fix highest file descriptor for select(), thanks to Ben Millwood for reporting
git-svn-id: svn://svn.icculus.org/quake3/trunk@1568 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/qcommon')
-rw-r--r-- | code/qcommon/net_ip.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/code/qcommon/net_ip.c b/code/qcommon/net_ip.c index 67d7109..ea1a0b3 100644 --- a/code/qcommon/net_ip.c +++ b/code/qcommon/net_ip.c @@ -1654,8 +1654,7 @@ void NET_Sleep( int msec ) { { FD_SET(ip_socket, &fdset); - if(ip_socket > highestfd) - highestfd = ip_socket; + highestfd = ip_socket; } if(ip6_socket != INVALID_SOCKET) { @@ -1667,7 +1666,7 @@ void NET_Sleep( int msec ) { timeout.tv_sec = msec/1000; timeout.tv_usec = (msec%1000)*1000; - select(ip_socket+1, &fdset, NULL, NULL, &timeout); + select(highestfd + 1, &fdset, NULL, NULL, &timeout); } |