From: Timo Korvola Date: Sat, 27 Jan 2018 17:51:29 +0000 (+0200) Subject: Call endwin() if unix_get_terminal_size() has to punt. X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=a0990b401c25ae7fc4a183ba87735413ab69467d;p=liskon_frotz.git Call endwin() if unix_get_terminal_size() has to punt. Curses must be very messed up at this point. Turn it off and hope something prints on our way out. This is 3505ee0d revived, as it got clobbered in the merge. --- diff --git a/src/curses/ux_init.c b/src/curses/ux_init.c index 09fea50..fb491f8 100644 --- a/src/curses/ux_init.c +++ b/src/curses/ux_init.c @@ -389,8 +389,11 @@ void unix_get_terminal_size() else h_screen_cols = MIN(255, x); - if (h_screen_cols < 1) + if (h_screen_cols < 1) { + endwin(); + u_setup.curses_active = FALSE; os_fatal("Invalid screen width. Must be between 1 and 255."); + } h_font_width = 1; h_font_height = 1;