summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--regex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regex.c b/regex.c
index fa825ab3..fd404b8b 100644
--- a/regex.c
+++ b/regex.c
@@ -1104,7 +1104,7 @@ static void nfa_free(nfa_t nfa)
all[0] = nfa.start;
all[1] = nfa.accept;
- nstates = nfa_all_states(all, 2, nfa.start->a.visited);
+ nstates = nfa_all_states(all, 2, nfa.start->a.visited + 1);
for (i = 0; i < nstates; i++)
nfa_state_free(all[i]);