From 125138e22420a1233a7479a612634083d219c113 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 2 Sep 1994 20:17:12 +0000 Subject: [PATCH] (display_text_line): Don't overrun the charstart area. --- src/xdisp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xdisp.c b/src/xdisp.c index c67eeea232a..4369f5154be 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -2309,7 +2309,7 @@ display_text_line (w, start, vpos, hpos, taboffset) if (p1 != p1prev) { int *p2x = &charstart[p1prev - p1start]; - int *p2 = &charstart[p1 - p1start]; + int *p2 = &charstart[(p1 < endp ? p1 : endp) - p1start]; /* The window's left column should always contain a character position. -- 2.39.5