From 3e57ebb80cb57499e0716c62eafa65771c88140d Mon Sep 17 00:00:00 2001 From: cabelo Date: Sat, 23 Mar 2019 17:08:13 -0300 Subject: [PATCH] null values --- src/main/cpp/tiv.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/cpp/tiv.cpp b/src/main/cpp/tiv.cpp index a3975fb..e6a765b 100644 --- a/src/main/cpp/tiv.cpp +++ b/src/main/cpp/tiv.cpp @@ -420,9 +420,10 @@ int main(int argc, char* argv[]) { struct winsize w; ioctl(STDOUT_FILENO, TIOCGWINSZ, &w); - //If redirect STDOUT to one file - if(w.ws_col == 0 && w.ws_col == 0) - ioctl(0, TIOCGWINSZ, &w); + //If redirect STDOUT to one file ( col and row == 0 ) + if(w.ws_col == 0 && w.ws_row == 0) { + ioctl(0, TIOCGWINSZ, &w); + } int maxWidth = w.ws_col * 4; int maxHeight = w.ws_row * 8;