diff options
| author | Karl Heuer | 1994-06-03 03:26:11 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-06-03 03:26:11 +0000 |
| commit | 1105ff2059bda83b1a9f3fd659b4b88145b476bb (patch) | |
| tree | 7ef78d872f8b38de2fcc39a53f251b2545f4246a | |
| parent | 03993eef27baaa1b13bca37204be181f83222e18 (diff) | |
| download | emacs-1105ff2059bda83b1a9f3fd659b4b88145b476bb.tar.gz emacs-1105ff2059bda83b1a9f3fd659b4b88145b476bb.zip | |
(display_text_line): Make sure pointer is in range.
| -rw-r--r-- | src/xdisp.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index e3e28d764e6..fa6e0c1493c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -2196,8 +2196,12 @@ display_text_line (w, start, vpos, hpos, taboffset) | |||
| 2196 | /* Draw the face of the newline character as extending all the | 2196 | /* Draw the face of the newline character as extending all the |
| 2197 | way to the end of the frame line. */ | 2197 | way to the end of the frame line. */ |
| 2198 | if (current_face) | 2198 | if (current_face) |
| 2199 | while (p1 < endp) | 2199 | { |
| 2200 | *p1++ = FAST_MAKE_GLYPH (' ', current_face); | 2200 | if (p1 < leftmargin) |
| 2201 | p1 = leftmargin; | ||
| 2202 | while (p1 < endp) | ||
| 2203 | *p1++ = FAST_MAKE_GLYPH (' ', current_face); | ||
| 2204 | } | ||
| 2201 | #endif | 2205 | #endif |
| 2202 | break; | 2206 | break; |
| 2203 | } | 2207 | } |
| @@ -2229,8 +2233,12 @@ display_text_line (w, start, vpos, hpos, taboffset) | |||
| 2229 | /* Draw the face of the newline character as extending all the | 2233 | /* Draw the face of the newline character as extending all the |
| 2230 | way to the end of the frame line. */ | 2234 | way to the end of the frame line. */ |
| 2231 | if (current_face) | 2235 | if (current_face) |
| 2232 | while (p1 < endp) | 2236 | { |
| 2233 | *p1++ = FAST_MAKE_GLYPH (' ', current_face); | 2237 | if (p1 < leftmargin) |
| 2238 | p1 = leftmargin; | ||
| 2239 | while (p1 < endp) | ||
| 2240 | *p1++ = FAST_MAKE_GLYPH (' ', current_face); | ||
| 2241 | } | ||
| 2234 | #endif | 2242 | #endif |
| 2235 | break; | 2243 | break; |
| 2236 | } | 2244 | } |