Skip to content

Commit

Permalink
Prevent iseof from returning immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
andfoy committed Jan 2, 2023
1 parent 409fef9 commit e6dc3ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pty/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ fn is_eof(process: HANDLE, stream: HANDLE) -> Result<bool, OsString> {
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 {
Expand Down

0 comments on commit e6dc3ae

Please sign in to comment.