mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-12-11 21:21:32 +00:00
#5672 - Fixed incorrect type usage in NET_Sleep(), patch from Özkan Sezer.
This commit is contained in:
parent
68b3b0922b
commit
725c9df608
1 changed files with 4 additions and 3 deletions
|
@ -1655,7 +1655,8 @@ void NET_Sleep(int msec)
|
|||
{
|
||||
struct timeval timeout;
|
||||
fd_set fdr;
|
||||
int highestfd = -1, retval;
|
||||
int retval;
|
||||
SOCKET highestfd = INVALID_SOCKET;
|
||||
|
||||
if(msec < 0)
|
||||
msec = 0;
|
||||
|
@ -1672,7 +1673,7 @@ void NET_Sleep(int msec)
|
|||
{
|
||||
FD_SET(ip6_socket, &fdr);
|
||||
|
||||
if((int)ip6_socket > highestfd)
|
||||
if(ip6_socket > highestfd)
|
||||
highestfd = ip6_socket;
|
||||
}
|
||||
|
||||
|
@ -1680,7 +1681,7 @@ void NET_Sleep(int msec)
|
|||
timeout.tv_usec = (msec%1000)*1000;
|
||||
|
||||
#ifdef _WIN32
|
||||
if(highestfd < 0)
|
||||
if(highestfd == INVALID_SOCKET)
|
||||
{
|
||||
// windows ain't happy when select is called without valid FDs
|
||||
SleepEx(msec, 0);
|
||||
|
|
Loading…
Reference in a new issue