mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-08 20:50:52 -08:00
Fix bug #18339 with segfault when $ is typed into empty LaTeX buffer.
Back-ported from trunk revision-id: 2014-08-27T19:40:54Z!eliz@gnu.org src/syntax.c (scan_lists): Don't examine positions before BEGV.
This commit is contained in:
parent
b62da77c1c
commit
74910c5d07
2 changed files with 12 additions and 4 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2014-08-28 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* syntax.c (scan_lists): Don't examine positions before BEGV.
|
||||
(Bug#18339)
|
||||
|
||||
2014-08-25 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Don't define.
|
||||
|
|
|
|||
11
src/syntax.c
11
src/syntax.c
|
|
@ -2859,10 +2859,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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue