Scope-eye.net Git Repository
/
liskon_frotz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7b6e8f
)
Fix #34: Exit if screen is wider than 255 instead of giving width of zero.
author
David Griffith
<dave@661.org>
Tue, 10 Jan 2017 12:45:21 +0000
(
04:45
-0800)
committer
David Griffith
<dave@661.org>
Tue, 10 Jan 2017 12:45:21 +0000
(
04:45
-0800)
src/curses/ux_init.c
patch
|
blob
|
history
diff --git
a/src/curses/ux_init.c
b/src/curses/ux_init.c
index 257b5475122d50e12002a137496cf6842a8add89..8d564d1a341cc848695b04c23dc95244a40ca215 100644
(file)
--- 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;