Turn off curses before doing an os_fatal() for screen width > 255.
authorDavid Griffith <dave@661.org>
Fri, 26 Jan 2018 13:56:16 +0000 (05:56 -0800)
committerDavid Griffith <dave@661.org>
Fri, 26 Jan 2018 13:56:16 +0000 (05:56 -0800)
src/curses/ux_init.c

index 50ad88a94052a70777456229640db02b094bd4d3..6e6057fd883d5b8b73fccc8e719073d8ef0a1752 100644 (file)
@@ -459,8 +459,11 @@ void os_init_screen (void)
     h_screen_width = h_screen_cols;
     h_screen_height = h_screen_rows;
 
-    if (h_screen_width < 1)
+    if (h_screen_width < 1) {
+       endwin();
+       u_setup.curses_active = FALSE;
        os_fatal("Invalid screen width. Must be between 1 and 255.");
+    }
 
     /* Screen width is an 8-bit value in the Z-machine design itself. */
     if (h_screen_width > 255)