]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.003 v7.4.003
authorBram Moolenaar <Bram@vim.org>
Wed, 14 Aug 2013 12:18:40 +0000 (14:18 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 14 Aug 2013 12:18:40 +0000 (14:18 +0200)
Problem:    Memory access error in Ruby syntax highlighting. (Christopher Chow)
Solution:   Refresh stale pointer. (James McCoy)

src/regexp_nfa.c
src/version.c

index 203d9ff64ad17ae5ad94ea246fcc9306e2967391..57539f4e53e65766bd56042156360ed8e88cd68c 100644 (file)
@@ -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;
index f23fd0d78af70b4d04cf26b696d5ae458b2ab2f8..069c172ddc105d14d9376da6f9a0b3f76bfc6ac1 100644 (file)
@@ -727,6 +727,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3,
 /**/
     2,
 /**/