From 03ac3b5e95f68395ebc49fda5457a0e7941d40eb Mon Sep 17 00:00:00 2001 From: Misha Koshelev Date: Mon, 23 Jul 2007 20:30:17 -0500 Subject: [PATCH] urlmon: Don't ignore bytes read from IInternetProtocol_Read if hres is not S_OK (e.g., E_PENDING). Bytes can still be read with E_PENDING returned if the whole request could not be satisfied, don't ignore those. --- dlls/urlmon/binding.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c index cd82eb99fd6..62cac80a6ea 100644 --- a/dlls/urlmon/binding.c +++ b/dlls/urlmon/binding.c @@ -146,10 +146,9 @@ static void fill_stream_buffer(ProtocolStream *This) This->hres = IInternetProtocol_Read(This->protocol, This->buf+This->buf_size, sizeof(This->buf)-This->buf_size, &read); - if(SUCCEEDED(This->hres)) { - This->buf_size += read; + This->buf_size += read; + if(read > 0) This->init_buf = TRUE; - } } static LRESULT WINAPI notif_wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)