1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-09 15:50:21 +00:00

Attempt to fix bug #17962 with SIGSEGV in display_line.

src/xdisp.c (display_line): Don't call FETCH_BYTE with argument less than 1.
This commit is contained in:
Eli Zaretskii 2014-07-12 13:29:13 +03:00
parent 47f63aa79a
commit dc47c639f9
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2014-07-12 Eli Zaretskii <eliz@gnu.org>
* 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)

View File

@ -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;
}
}