Commit 7fb08f69 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(calculate_scrolling): Defend against negative baud_rate.

parent 2d368234
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment