[console] Ensure console lines doesn't exceed view

This fixes a segfault in 32-bit nq-win caused by negative frame times
(due to something going weird with Sys_DoubleTime).
This commit is contained in:
Bill Currie 2022-03-21 19:21:54 +09:00
parent 4c90c3c4bb
commit 296c04c8eb

View file

@ -673,6 +673,9 @@ setup_console (void)
} else {
con_data.lines = lines;
}
if (con_data.lines > r_data->vid->conview->ylen) {
con_data.lines = r_data->vid->conview->ylen;
}
if (con_data.lines >= r_data->vid->conview->ylen - r_data->lineadj)
r_data->scr_copyeverything = 1;
}