Commit bbd550ad authored by Colin Finck's avatar Colin Finck Committed by Alexandre Julliard

wininet: Always pass a variable as lpNumberOfBytesWritten on a WriteFile call if…

wininet: Always pass a variable as lpNumberOfBytesWritten on a WriteFile call if lpOverlapped is set to NULL.
parent fd5c64dc
......@@ -1619,8 +1619,9 @@ static DWORD HTTP_Read(WININETHTTPREQW *req, void *buffer, DWORD size, DWORD *re
if(req->lpszCacheFile) {
BOOL res;
DWORD dwBytesWritten;
res = WriteFile(req->hCacheFile, buffer, bytes_read, NULL, NULL);
res = WriteFile(req->hCacheFile, buffer, bytes_read, &dwBytesWritten, NULL);
if(!res)
WARN("WriteFile failed: %u\n", GetLastError());
}
......@@ -1688,7 +1689,9 @@ static DWORD HTTP_ReadChunked(WININETHTTPREQW *req, void *buffer, DWORD size, DW
if (req->lpszCacheFile)
{
if (!WriteFile(req->hCacheFile, p, bytes_read, NULL, NULL))
DWORD dwBytesWritten;
if (!WriteFile(req->hCacheFile, p, bytes_read, &dwBytesWritten, NULL))
WARN("WriteFile failed: %u\n", GetLastError());
}
p += bytes_read;
......
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