From: David Griffith Date: Tue, 10 Jan 2017 12:45:21 +0000 (-0800) Subject: Fix #34: Exit if screen is wider than 255 instead of giving width of zero. X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=13a4b103f64c3e70f0b6191e9923b108494d48c9;p=liskon_frotz.git Fix #34: Exit if screen is wider than 255 instead of giving width of zero. --- diff --git a/src/curses/ux_init.c b/src/curses/ux_init.c index 257b547..8d564d1 100644 --- a/src/curses/ux_init.c +++ b/src/curses/ux_init.c @@ -442,6 +442,9 @@ void os_init_screen (void) h_screen_width = h_screen_cols; h_screen_height = h_screen_rows; + if (h_screen_width > 255 || h_screen_width < 1) + os_fatal("Invalid screen width. Must be between 1 and 255."); + h_font_width = 1; h_font_height = 1;