changeset 7772:7821be0db092

(display_text_line): Make sure pointer is in range.
author Karl Heuer <kwzh@gnu.org>
date Fri, 03 Jun 1994 03:26:11 +0000
parents f23eaf6babac
children 2226c7efb3da
files src/xdisp.c
diffstat 1 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Fri Jun 03 00:47:15 1994 +0000
+++ b/src/xdisp.c	Fri Jun 03 03:26:11 1994 +0000
@@ -2196,8 +2196,12 @@
 	  /* 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 @@
 	  /* 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;
 	}