null values

This commit is contained in:
cabelo 2019-03-22 18:51:10 -03:00 committed by Stefan Haustein
parent 543cebef37
commit 9717adc840

View file

@ -418,8 +418,11 @@ cimg_library::CImg<unsigned char> load_rgb_CImg(const char * const filename) {
int main(int argc, char* argv[]) { int main(int argc, char* argv[]) {
struct winsize w; struct winsize w;
ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
if(w.ws_col == 0 && w.ws_col == 0)
ioctl(0, TIOCGWINSZ, &w); ioctl(0, TIOCGWINSZ, &w);
int maxWidth = w.ws_col * 4; int maxWidth = w.ws_col * 4;
int maxHeight = w.ws_row * 8; int maxHeight = w.ws_row * 8;
int flags = 0; int flags = 0;