Commit 88204253 authored by deuce's avatar deuce
Browse files

If rd_p is NULL don't read one char (wowsers!)

parent b0a0bc10
......@@ -217,12 +217,14 @@ BOOL socket_check(SOCKET sock, BOOL* rd_p, BOOL* wr_p, DWORD timeout)
return(TRUE);
}
rd=recv(sock,&ch,1,MSG_PEEK);
if(rd==1
|| (rd==SOCKET_ERROR && ERROR_VALUE==EMSGSIZE)) {
if(rd_p!=NULL)
*rd_p=TRUE;
return(TRUE);
if(rd_p !=NULL) {
rd=recv(sock,&ch,1,MSG_PEEK);
if(rd==1
|| (rd==SOCKET_ERROR && ERROR_VALUE==EMSGSIZE)) {
if(rd_p!=NULL)
*rd_p=TRUE;
return(TRUE);
}
}
return(FALSE);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment