urlmon: The pcbRead parameter for IInternetProtocol::Read is optional, so fix the protocol implementation to check for this.

This commit is contained in:
Rob Shearman 2007-08-03 22:10:55 +01:00 committed by Alexandre Julliard
parent 9105b64a77
commit 25b2bff9bf
1 changed files with 4 additions and 2 deletions

View File

@ -487,12 +487,14 @@ static HRESULT WINAPI ProtocolStream_Read(IStream *iface, void *pv,
} }
if(read == cb) { if(read == cb) {
*pcbRead = read; if (pcbRead)
*pcbRead = read;
return S_OK; return S_OK;
} }
This->hres = IInternetProtocol_Read(This->protocol, (PBYTE)pv+read, cb-read, &pread); This->hres = IInternetProtocol_Read(This->protocol, (PBYTE)pv+read, cb-read, &pread);
*pcbRead = read + pread; if (pcbRead)
*pcbRead = read + pread;
if(This->hres == E_PENDING) if(This->hres == E_PENDING)
return E_PENDING; return E_PENDING;