diff options
| author | Richard M. Stallman | 1993-05-31 19:04:07 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-05-31 19:04:07 +0000 |
| commit | 7fb08f691ea45f8e1593497a85478ba52bf95a1e (patch) | |
| tree | c42c01e703bbfc6b73b09d3900809dac0ad277f2 /src/scroll.c | |
| parent | 2d3682341cf62a260125aae190c5a2b3df80fe10 (diff) | |
| download | emacs-7fb08f691ea45f8e1593497a85478ba52bf95a1e.tar.gz emacs-7fb08f691ea45f8e1593497a85478ba52bf95a1e.zip | |
(calculate_scrolling): Defend against negative baud_rate.
Diffstat (limited to 'src/scroll.c')
| -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, | |||
| 108 | at least 1/4 second. */ | 108 | at least 1/4 second. */ |
| 109 | int extra_cost = baud_rate / (10 * 4 * FRAME_HEIGHT (frame)); | 109 | int extra_cost = baud_rate / (10 * 4 * FRAME_HEIGHT (frame)); |
| 110 | 110 | ||
| 111 | if (baud_rate <= 0) | ||
| 112 | extra_cost = 1; | ||
| 113 | |||
| 111 | /* initialize the top left corner of the matrix */ | 114 | /* initialize the top left corner of the matrix */ |
| 112 | matrix->writecost = 0; | 115 | matrix->writecost = 0; |
| 113 | matrix->insertcost = INFINITY; | 116 | matrix->insertcost = INFINITY; |