Misha Koshelev : wininet: Don' t peek data in InternetQueryDataAvailable if there is no more to be expected .

Alexandre Julliard julliard at wine.codeweavers.com
Mon Aug 13 06:31:51 CDT 2007


Module: wine
Branch: master
Commit: 662f44a619c2261486ce27cee66bf49c99629029
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=662f44a619c2261486ce27cee66bf49c99629029

Author: Misha Koshelev <mk144210 at bcm.edu>
Date:   Sun Aug 12 15:38:05 2007 -0500

wininet: Don't peek data in InternetQueryDataAvailable if there is no more to be expected.

---

 dlls/wininet/internet.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
index aa74c7c..14cfd04 100644
--- a/dlls/wininet/internet.c
+++ b/dlls/wininet/internet.c
@@ -3325,8 +3325,8 @@ BOOL WINAPI InternetQueryDataAvailable( HINTERNET hFile,
                  * to peek only a single byte in async mode. */
                 BOOL async = (lpwhr->lpHttpSession->lpAppInfo->hdr.dwFlags & INTERNET_FLAG_ASYNC);
                 if (!NETCON_recv(&lpwhr->netConnection, buffer,
-                                 async ? 1 : min(sizeof(buffer),
-                                                 lpwhr->dwContentLength - lpwhr->dwContentRead),
+                                 min(async ? 1 : sizeof(buffer),
+                                     lpwhr->dwContentLength - lpwhr->dwContentRead),
                                  MSG_PEEK, (int *)lpdwNumberOfBytesAvailble))
                 {
                     INTERNET_SetLastError(ERROR_NO_MORE_FILES);




More information about the wine-cvs mailing list