win,pipe: fix missing assignment to success (#4515)

This commit is contained in:
Jameson Nash 2024-08-28 19:59:46 -04:00 committed by GitHub
parent 5cbc82e369
commit f00d4b6775
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2004,7 +2004,9 @@ static int uv__pipe_read_data(uv_loop_t* loop,
if (r == ERROR_IO_PENDING) {
r = CancelIoEx(handle->handle, &req->u.io.overlapped);
assert(r || GetLastError() == ERROR_NOT_FOUND);
if (!GetOverlappedResult(handle->handle, &req->u.io.overlapped, bytes_read, TRUE)) {
if (GetOverlappedResult(handle->handle, &req->u.io.overlapped, bytes_read, TRUE)) {
r = ERROR_SUCCESS;
} else {
r = GetLastError();
*bytes_read = 0;
}