From adf4f59cc8df4d3a927e55743dea04725c3fecf0 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 25 Apr 2010 17:42:34 +0300 Subject: [PATCH] Fix crash with bidi display on the last empty line (bug#6030). xdisp.c (display_line): Don't assume 2nd call to get_next_display_element cannot return zero. --- src/ChangeLog | 5 +++++ src/xdisp.c | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7561d6ebf61..8b1c81261cc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-04-25 Eli Zaretskii + + * xdisp.c (display_line): Fix crash with bidi display on the last + empty line. (Bug#6030) + 2010-04-24 Eli Zaretskii * xdisp.c (display_line): Use `reseat' instead of `reseat_1', and diff --git a/src/xdisp.c b/src/xdisp.c index 5e5684a845d..3282c42f2a7 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -17979,9 +17979,8 @@ display_line (it) row_end = it->current; /* If the character at max_pos+1 is a newline, skip that as well. Note that this may skip some invisible text. */ - if (!get_next_display_element (it)) - abort (); - if (ITERATOR_AT_END_OF_LINE_P (it)) + if (get_next_display_element (it) + && ITERATOR_AT_END_OF_LINE_P (it)) { set_iterator_to_next (it, 1); /* Record the position after the newline of a continued -- 2.39.5