Skip to content
Snippets Groups Projects
Commit 3e4f7a2a authored by deuce's avatar deuce
Browse files

Clamp curses maxx/maxy to 255 each.

parent bdf1848d
Branches
Tags
No related merge requests found
...@@ -1237,9 +1237,16 @@ int curs_get_modepalette(uint32_t p[16]) ...@@ -1237,9 +1237,16 @@ int curs_get_modepalette(uint32_t p[16])
void curs_textmode(int mode) void curs_textmode(int mode)
{ {
int vm; int vm;
int maxx, maxy;
curs_resume(); curs_resume();
getmaxyx(stdscr, cio_textinfo.screenheight, cio_textinfo.screenwidth); getmaxyx(stdscr, maxy, maxx);
if (maxy > 255)
maxy = 255;
if (maxx > 255)
maxx = 255;
cio_textinfo.screenheight = maxy;
cio_textinfo.screenwidth = maxx;
if(has_colors()) if(has_colors())
cio_textinfo.currmode=COLOR_MODE; cio_textinfo.currmode=COLOR_MODE;
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment