Commit 9bac5fd9 authored by Eli Zaretskii's avatar Eli Zaretskii

Fix bug #18339 with segfault when $ is typed into empty LaTeX buffer.

 src/syntax.c (scan_lists): Don't examine positions before BEGV.
parent 110d87a1
2014-08-27 Eli Zaretskii <eliz@gnu.org>
* syntax.c (scan_lists): Don't examine positions before BEGV.
(Bug#18339)
2014-08-27 Paul Eggert <eggert@cs.ucla.edu>
Improve robustness of new string-collation code (Bug#18051).
......
......@@ -2857,10 +2857,13 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag)
case Smath:
if (!sexpflag)
break;
temp_pos = dec_bytepos (from_byte);
UPDATE_SYNTAX_TABLE_BACKWARD (from - 1);
if (from != stop && c == FETCH_CHAR_AS_MULTIBYTE (temp_pos))
DEC_BOTH (from, from_byte);
if (from > BEGV)
{
temp_pos = dec_bytepos (from_byte);
UPDATE_SYNTAX_TABLE_BACKWARD (from - 1);
if (from != stop && c == FETCH_CHAR_AS_MULTIBYTE (temp_pos))
DEC_BOTH (from, from_byte);
}
if (mathexit)
{
mathexit = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment