From 1105ff2059bda83b1a9f3fd659b4b88145b476bb Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Fri, 3 Jun 1994 03:26:11 +0000 Subject: [PATCH] (display_text_line): Make sure pointer is in range. --- src/xdisp.c | 16 ++++++++++++---- 1 file 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) /* Draw the face of the newline character as extending all the way to the end of the frame line. */ if (current_face) - while (p1 < endp) - *p1++ = FAST_MAKE_GLYPH (' ', current_face); + { + if (p1 < leftmargin) + p1 = leftmargin; + while (p1 < endp) + *p1++ = FAST_MAKE_GLYPH (' ', current_face); + } #endif break; } @@ -2229,8 +2233,12 @@ display_text_line (w, start, vpos, hpos, taboffset) /* Draw the face of the newline character as extending all the way to the end of the frame line. */ if (current_face) - while (p1 < endp) - *p1++ = FAST_MAKE_GLYPH (' ', current_face); + { + if (p1 < leftmargin) + p1 = leftmargin; + while (p1 < endp) + *p1++ = FAST_MAKE_GLYPH (' ', current_face); + } #endif break; } -- 2.39.5