diff options
| author | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-07-22 17:09:24 +0000 |
|---|---|---|
| committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-07-22 17:09:24 +0000 |
| commit | 3a6af46aeb150fbe79d454cdc89409354e83de66 (patch) | |
| tree | 9968b6f1b582b0aa85caea2aaf445b501faf1d93 | |
| parent | 9a102dfc8b6d814eac0350813be0fb13a4089238 (diff) | |
| download | emacs-3a6af46aeb150fbe79d454cdc89409354e83de66.tar.gz | |
(char_quoted): Check "charpos > beg" before decrementing.
| -rw-r--r-- | src/ChangeLog | 12 | ||||
| -rw-r--r-- | src/syntax.c | 18 |
2 files changed, 10 insertions, 20 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8003b50af22..db06d3a4d30 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,11 @@ +2008-07-22 Stefan Monnier <monnier@iro.umontreal.ca> + + * syntax.c (char_quoted): Check "charpos > beg" before decrementing. + 2008-07-22 Dan Nicolaescu <dann@ics.uci.edu> - * nsfns.m (x_set_menu_bar_lines, x_set_tool_bar_lines): Remove - forwarding functions. + * nsfns.m (x_set_menu_bar_lines, x_set_tool_bar_lines): + Remove forwarding functions. (ns_set_menu_bar_lines): Rename to x_set_menu_bar_lines, make non-static. (ns_set_tool_bar_lines): Rename to x_set_tool_bar_lines, make @@ -15,8 +19,8 @@ 2008-07-22 Jason Rumney <jasonr@gnu.org> - * w32proc.c (Fw32_long_file_name): Don't append dir separator to - bare drive. + * w32proc.c (Fw32_long_file_name): Don't append dir separator to + bare drive. 2008-07-22 Adrian Robert <Adrian.B.Robert@gmail.com> diff --git a/src/syntax.c b/src/syntax.c index 2e9313fd6b1..87cf2da2e39 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -298,23 +298,10 @@ char_quoted (charpos, bytepos) register int quoted = 0; int orig = charpos; -#ifdef HAVE_NS - /* For some reason keeps getting called w/both 1, then segfaulting - due to the definitions of DEC_BOTH and DEC_POS in character.h, - which lead to decrementing below initial address and then examining - character there. Need to investigate further.. */ - if (charpos < 2 || bytepos < 2) - { - //fprintf(stderr,"Returning because charpos = %d, bytepos = %d\n",charpos, bytepos); - return 0; - } -#endif - - DEC_BOTH (charpos, bytepos); - - while (charpos >= beg) + while (charpos > beg) { int c; + DEC_BOTH (charpos, bytepos); UPDATE_SYNTAX_TABLE_BACKWARD (charpos); c = FETCH_CHAR_AS_MULTIBYTE (bytepos); @@ -322,7 +309,6 @@ char_quoted (charpos, bytepos) if (! (code == Scharquote || code == Sescape)) break; - DEC_BOTH (charpos, bytepos); quoted = !quoted; } |
