[2/2] kernel32: Remove a 0-length read optimization from ReadFile. Resend.
Dmitry Timoshkov
dmitry at baikal.ru
Fri Sep 13 02:12:39 CDT 2013
This matches WriteFile behaviour and ensures that invalid parameters are
properly handled and fields in the OVERLAPPED structure are initialized.
Test failures in shlwapi were fixed by a separate patch.
---
dlls/kernel32/file.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c
index 506b651..7dd65cd 100644
--- a/dlls/kernel32/file.c
+++ b/dlls/kernel32/file.c
@@ -408,7 +408,6 @@ BOOL WINAPI ReadFile( HANDLE hFile, LPVOID buffer, DWORD bytesToRead,
bytesRead, overlapped );
if (bytesRead) *bytesRead = 0; /* Do this before anything else */
- if (!bytesToRead) return TRUE;
if (is_console_handle(hFile))
{
--
1.8.3.4
More information about the wine-patches
mailing list