wininet: Don't try to read anything if 0 bytes are to be read.

This commit is contained in:
Rob Shearman 2007-01-10 09:30:22 -06:00 committed by Alexandre Julliard
parent e994f88cc2
commit 392ceba61f
1 changed files with 5 additions and 0 deletions

View File

@ -498,6 +498,11 @@ BOOL NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int f
int *recvd /* out */)
{
if (!NETCON_connected(connection)) return FALSE;
if (!len)
{
*recvd = 0;
return TRUE;
}
if (!connection->useSSL)
{
*recvd = recv(connection->socketFD, buf, len, flags);