diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-08-14 14:18:40 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-08-14 14:18:40 +0200 |
commit | ebefd997bbc2ec79fd33145fd88126cfd1b87fa3 (patch) | |
tree | 8da6ffad1e57f01f07b471402389071e0ee26deb | |
parent | 3f0df06c2860788c6591b03e38b7dcd5bcfd27a6 (diff) | |
download | vim-git-7.4.003.tar.gz |
updated for version 7.4.003v7.4.003
Problem: Memory access error in Ruby syntax highlighting. (Christopher Chow)
Solution: Refresh stale pointer. (James McCoy)
-rw-r--r-- | src/regexp_nfa.c | 18 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index 203d9ff64..57539f4e5 100644 --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -4120,7 +4120,7 @@ skip_add: sub = &subs->norm; } #ifdef FEAT_SYN_HL - else if (state->c >= NFA_ZOPEN) + else if (state->c >= NFA_ZOPEN && state->c <= NFA_ZOPEN9) { subidx = state->c - NFA_ZOPEN; sub = &subs->synt; @@ -4189,6 +4189,13 @@ skip_add: } subs = addstate(l, state->out, subs, pim, off); + /* "subs" may have changed, need to set "sub" again */ +#ifdef FEAT_SYN_HL + if (state->c >= NFA_ZOPEN && state->c <= NFA_ZOPEN9) + sub = &subs->synt; + else +#endif + sub = &subs->norm; if (save_in_use == -1) { @@ -4237,7 +4244,7 @@ skip_add: sub = &subs->norm; } #ifdef FEAT_SYN_HL - else if (state->c >= NFA_ZCLOSE) + else if (state->c >= NFA_ZCLOSE && state->c <= NFA_ZCLOSE9) { subidx = state->c - NFA_ZCLOSE; sub = &subs->synt; @@ -4281,6 +4288,13 @@ skip_add: } subs = addstate(l, state->out, subs, pim, off); + /* "subs" may have changed, need to set "sub" again */ +#ifdef FEAT_SYN_HL + if (state->c >= NFA_ZCLOSE && state->c <= NFA_ZCLOSE9) + sub = &subs->synt; + else +#endif + sub = &subs->norm; if (REG_MULTI) sub->list.multi[subidx].end = save_lpos; diff --git a/src/version.c b/src/version.c index f23fd0d78..069c172dd 100644 --- a/src/version.c +++ b/src/version.c @@ -728,6 +728,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3, +/**/ 2, /**/ 1, |