Commit 25b2bff9 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

urlmon: The pcbRead parameter for IInternetProtocol::Read is optional, so fix…

urlmon: The pcbRead parameter for IInternetProtocol::Read is optional, so fix the protocol implementation to check for this.
parent 9105b64a
...@@ -487,12 +487,14 @@ static HRESULT WINAPI ProtocolStream_Read(IStream *iface, void *pv, ...@@ -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;
......
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