From e6dc3ae8c95177d4a0aaea2e69f7bc18baf51d7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Andr=C3=A9s=20Margffoy=20Tuay?= Date: Mon, 2 Jan 2023 11:27:32 -0500 Subject: [PATCH] Prevent iseof from returning immediately --- src/pty/base.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pty/base.rs b/src/pty/base.rs index fa7ad6a..6b50bd1 100644 --- a/src/pty/base.rs +++ b/src/pty/base.rs @@ -291,7 +291,7 @@ fn is_eof(process: HANDLE, stream: HANDLE) -> Result { let bytes_ptr: *mut u32 = ptr::addr_of_mut!(*bytes.as_mut_ptr()); let bytes_ref = Some(bytes_ptr); let succ = PeekNamedPipe( - stream, None, 0, bytes_ref, None, None).as_bool(); + stream, None, 0, None, bytes_ref, None).as_bool(); let total_bytes = bytes.assume_init(); if succ {