diff src/regexp_nfa.c @ 4924:6ae32a64e153 v7.3.1207

updated for version 7.3.1207 Problem: New regexp engine: no match found on "#if FOO". (Lech Lorens) Solution: When adding a state gets skipped don't adjust the index.
author Bram Moolenaar <bram@vim.org>
date Sun, 16 Jun 2013 15:43:50 +0200
parents 91136a41f83f
children bcb84438bb5b
line wrap: on
line diff
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -4210,6 +4210,8 @@ addstate_here(l, state, subs, pim, ip)
 
     /* re-order to put the new state at the current position */
     count = l->n - tlen;
+    if (count == 0)
+	return; /* no state got added */
     if (count == 1)
     {
 	/* overwrite the current state */