diff options
author | dgp <dgp@users.sourceforge.net> | 2007-11-15 17:07:09 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2007-11-15 17:07:09 (GMT) |
commit | 0d571ed33320f761a463464e4ed2886eee487898 (patch) | |
tree | 6fbc4eff76e373879785b04dc5747a4e4f93fd9f | |
parent | f9c7eb3572a52ec4b69ff9552d7caf55aa0e59af (diff) | |
download | tcl-0d571ed33320f761a463464e4ed2886eee487898.zip tcl-0d571ed33320f761a463464e4ed2886eee487898.tar.gz tcl-0d571ed33320f761a463464e4ed2886eee487898.tar.bz2 |
* generic/regc_nfa.c: Corrected looping logic in fixempties() to
avoid wasting time walking a list of dead states. [Bug 1832612]
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/regc_nfa.c | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2007-11-15 Don Porter <dgp@users.sourceforge.net> + + * generic/regc_nfa.c: Corrected looping logic in fixempties() to + avoid wasting time walking a list of dead states. [Bug 1832612] + 2007-11-15 Donal K. Fellows <donal.k.fellows@man.ac.uk> * generic/tclNamesp.c (NamespaceEnsembleCmd): Must pass a non-NULL diff --git a/generic/regc_nfa.c b/generic/regc_nfa.c index 20e821f..c5d7bc9 100644 --- a/generic/regc_nfa.c +++ b/generic/regc_nfa.c @@ -1133,7 +1133,8 @@ fixempties( do { progress = 0; - for (s = nfa->states; s != NULL && !NISERR(); s = nexts) { + for (s = nfa->states; s != NULL && !NISERR() + && s->no != FREESTATE; s = nexts) { nexts = s->next; for (a = s->outs; a != NULL && !NISERR(); a = nexta) { nexta = a->outchain; |