From 60ecf8dd1bbba4c36ddfec9f90e9e0cdc5f30f22 Mon Sep 17 00:00:00 2001 From: Severen Redwood Date: Fri, 26 Aug 2016 20:14:26 +1200 Subject: [PATCH] Correctly the check the ioctl exit code --- src/screen/unix.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screen/unix.rs b/src/screen/unix.rs index 6734454..7e27336 100644 --- a/src/screen/unix.rs +++ b/src/screen/unix.rs @@ -35,7 +35,7 @@ pub fn size() -> Option<(Width, Height)> { let mut winsize = WinSize { ws_row: 0, ws_col: 0, ws_xpixel: 0, ws_ypixel: 0 }; let success: bool = unsafe { - ioctl(STDOUT_FILENO, TIOCGWINSZ, &mut winsize) != 0 + ioctl(STDOUT_FILENO, TIOCGWINSZ, &mut winsize) == 0 }; if success { -- 2.11.4.GIT