1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-08 04:30:45 -08:00

(calculate_scrolling): Defend against negative baud_rate.

This commit is contained in:
Richard M. Stallman 1993-05-31 19:04:07 +00:00
parent 2d3682341c
commit 7fb08f691e

View file

@ -108,6 +108,9 @@ calculate_scrolling (frame, matrix, window_size, lines_below,
at least 1/4 second. */
int extra_cost = baud_rate / (10 * 4 * FRAME_HEIGHT (frame));
if (baud_rate <= 0)
extra_cost = 1;
/* initialize the top left corner of the matrix */
matrix->writecost = 0;
matrix->insertcost = INFINITY;