From 2ae485dad840228af1a4b1d88f9d72eed3d284b1 Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Thu, 7 May 2020 11:27:05 -0700 Subject: [PATCH] Fixed dwErrorStatus check --- microstack/ILibProcessPipe.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/microstack/ILibProcessPipe.c b/microstack/ILibProcessPipe.c index f805442..606a9ef 100644 --- a/microstack/ILibProcessPipe.c +++ b/microstack/ILibProcessPipe.c @@ -1428,6 +1428,8 @@ BOOL ILibProcessPipe_Pipe_ReadEx_sink(void *chain, HANDLE h, ILibWaitHandle_Erro ILibProcessPipe_PipeObject *j = (ILibProcessPipe_PipeObject*)user; DWORD bytesRead = 0; + if (status == ILibWaitHandle_ErrorStatus_INVALID_HANDLE) { return(FALSE); } + if (GetOverlappedResult(j->mPipe_ReadEnd, j->mOverlapped, &bytesRead, FALSE)) { if (j->user2 != NULL) { ((ILibProcessPipe_Pipe_ReadExHandler)j->user2)(j, j->user1, 0, j->buffer, (int)bytesRead); }