diff options
Diffstat (limited to 'support')
-rw-r--r-- | support/ChangeLog | 4 | ||||
-rw-r--r-- | support/dfa.c | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/support/ChangeLog b/support/ChangeLog index b81b0e71..edef437e 100644 --- a/support/ChangeLog +++ b/support/ChangeLog @@ -1,3 +1,7 @@ +2020-11-01 Arnold D. Robbins <arnold@skeeve.com> + + * dfa.c: Synced from GNULIB. + 2020-10-15 Arnold D. Robbins <arnold@skeeve.com> * random.c: Move code to using prototypes. diff --git a/support/dfa.c b/support/dfa.c index 8aef2f37..df32dd90 100644 --- a/support/dfa.c +++ b/support/dfa.c @@ -2437,7 +2437,7 @@ merge_nfa_state (struct dfa *d, idx_t tindex, char *flags, continue; } - if (!(flags[sindex] & (OPT_LPAREN | OPT_RPAREN))) + if (sindex != tindex && !(flags[sindex] & (OPT_LPAREN | OPT_RPAREN))) { idx_t j; @@ -2445,6 +2445,9 @@ merge_nfa_state (struct dfa *d, idx_t tindex, char *flags, { idx_t dindex = follows[tindex].elems[j].index; + if (dindex == tindex) + continue; + if (follows[tindex].elems[j].constraint != iconstraint) continue; |