Skip to content

Commit

Permalink
actually use GetConsoleScreenBufferInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
softprops committed Sep 12, 2016
1 parent 764de4a commit d172763
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ pub fn is(stream: Stream) -> bool {
let mut buffer_info = unsafe { ::std::mem::uninitialized() };
panic!("is invalid? {:#?} result {:#?} last err {:#?}",
winapi::INVALID_HANDLE_VALUE == std_handle,
kernel32::GetConsoleMode(std_handle, &mut buffer_info),
kernel32::GetConsoleScreenBufferInfo(std_handle, &mut buffer_info),
kernel32::GetLastError());
kernel32::GetConsoleMode(std_handle, &mut buffer_info) != 0
kernel32::GetConsoleScreenBufferInfo(std_handle, &mut buffer_info) != 0
}
}

Expand Down

0 comments on commit d172763

Please sign in to comment.