diff --git a/src/ChangeLog b/src/ChangeLog index 493bcde7418..9051d37fcef 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2014-07-12 Eli Zaretskii + * xdisp.c (display_line): Don't call FETCH_BYTE with argument less + than 1. (Bug#17962) + * w32fns.c (Fx_file_dialog): Mention in the doc string the behavior on Windows 7 and later when the function is repeatedly invoked with the same value of DIR. (Bug#17950) diff --git a/src/xdisp.c b/src/xdisp.c index 61d1fa24c68..6918c4360d4 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -20512,7 +20512,10 @@ display_line (struct it *it) row->truncated_on_right_p = 1; it->continuation_lines_width = 0; reseat_at_next_visible_line_start (it, 0); - row->ends_at_zv_p = FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n'; + if (IT_BYTEPOS (*it) <= BEG_BYTE) + row->ends_at_zv_p = true; + else + row->ends_at_zv_p = FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n'; break; } }