diff options
| author | Gerd Moellmann | 2000-09-08 09:35:57 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-09-08 09:35:57 +0000 |
| commit | a8710abfaf9468e6d1ff5d2533eafca17b43718b (patch) | |
| tree | 919c7d5e8aded795b61d0db1fffb250d25359e0e /src | |
| parent | 6b7d4ae4d19324a0e25735d8a055c3be8a262036 (diff) | |
| download | emacs-a8710abfaf9468e6d1ff5d2533eafca17b43718b.tar.gz emacs-a8710abfaf9468e6d1ff5d2533eafca17b43718b.zip | |
(x_draw_glyphs): Handle case START and END are out
of bounds more carefully.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xterm.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 5e9690bd845..86f72ecda45 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2000-09-08 Gerd Moellmann <gerd@gnu.org> | ||
| 2 | |||
| 3 | * xterm.c (x_draw_glyphs): Handle case START and END are out | ||
| 4 | of bounds more carefully. | ||
| 5 | |||
| 1 | 2000-09-08 Dave Love <fx@gnu.org> | 6 | 2000-09-08 Dave Love <fx@gnu.org> |
| 2 | 7 | ||
| 3 | * unexelf.c (SHT_MIPS_DEBUG, HDRR) [__mips__]: Really confine last | 8 | * unexelf.c (SHT_MIPS_DEBUG, HDRR) [__mips__]: Really confine last |
diff --git a/src/xterm.c b/src/xterm.c index 73ccf6040a6..f72b20cda50 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -4693,8 +4693,9 @@ x_draw_glyphs (w, x, row, area, start, end, hl, real_start, real_end, | |||
| 4693 | int i, j; | 4693 | int i, j; |
| 4694 | 4694 | ||
| 4695 | /* Let's rather be paranoid than getting a SEGV. */ | 4695 | /* Let's rather be paranoid than getting a SEGV. */ |
| 4696 | start = max (0, start); | ||
| 4697 | end = min (end, row->used[area]); | 4696 | end = min (end, row->used[area]); |
| 4697 | start = max (0, start); | ||
| 4698 | start = min (end, start); | ||
| 4698 | if (real_start) | 4699 | if (real_start) |
| 4699 | *real_start = start; | 4700 | *real_start = start; |
| 4700 | if (real_end) | 4701 | if (real_end) |
| @@ -4748,7 +4749,7 @@ x_draw_glyphs (w, x, row, area, start, end, hl, real_start, real_end, | |||
| 4748 | /* If there are any glyphs with lbearing < 0 or rbearing > width in | 4749 | /* If there are any glyphs with lbearing < 0 or rbearing > width in |
| 4749 | the row, redraw some glyphs in front or following the glyph | 4750 | the row, redraw some glyphs in front or following the glyph |
| 4750 | strings built above. */ | 4751 | strings built above. */ |
| 4751 | if (!overlaps_p && row->contains_overlapping_glyphs_p) | 4752 | if (head && !overlaps_p && row->contains_overlapping_glyphs_p) |
| 4752 | { | 4753 | { |
| 4753 | int dummy_x = 0; | 4754 | int dummy_x = 0; |
| 4754 | struct glyph_string *h, *t; | 4755 | struct glyph_string *h, *t; |
| @@ -4847,6 +4848,7 @@ x_draw_glyphs (w, x, row, area, start, end, hl, real_start, real_end, | |||
| 4847 | if (area > TEXT_AREA) | 4848 | if (area > TEXT_AREA) |
| 4848 | x_reached -= window_box_width (w, TEXT_AREA); | 4849 | x_reached -= window_box_width (w, TEXT_AREA); |
| 4849 | } | 4850 | } |
| 4851 | |||
| 4850 | return x_reached; | 4852 | return x_reached; |
| 4851 | } | 4853 | } |
| 4852 | 4854 | ||