libwinpr-file: fix improper status code in overlapped i/o

This commit is contained in:
Marc-André Moreau 2014-02-28 11:24:44 -05:00
parent f7bcdad775
commit 315885c1eb

View File

@ -370,7 +370,7 @@ BOOL ReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
{
case ECONNRESET:
SetLastError(ERROR_BROKEN_PIPE);
io_status = -1;
io_status = 0;
break;
}
}
@ -386,7 +386,7 @@ BOOL ReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
}
}
*lpNumberOfBytesRead = status;
*lpNumberOfBytesRead = io_status;
}
else
{