diff options
author | Richard M. Stallman <rms@gnu.org> | 1993-05-31 19:04:07 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1993-05-31 19:04:07 +0000 |
commit | 7a1ab3edf996b39aff04e6dbca25b0f117cdd8f9 (patch) | |
tree | d528c1ac3b332a5bfbaa7865e42cb4ab0d7ba5a5 | |
parent | 3700e407ff6fcd4e1afc82b846bbe1214c16dd07 (diff) | |
download | emacs-7a1ab3edf996b39aff04e6dbca25b0f117cdd8f9.tar.gz |
(calculate_scrolling): Defend against negative baud_rate.
-rw-r--r-- | src/scroll.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/scroll.c b/src/scroll.c index c4882cd091f..3f2724380b3 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -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; |