From 9d6b8d348463a0b89d001f649fe65f966ba486b5 Mon Sep 17 00:00:00 2001 From: thilo Date: Fri, 5 Jun 2009 18:54:47 +0000 Subject: 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 --- code/qcommon/net_ip.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'code/qcommon') 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); } -- cgit v1.2.3