summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--generic/regc_nfa.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ee38587..be66f21 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;