summaryrefslogtreecommitdiffstats
path: root/generic/regc_nfa.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-11-15 17:07:09 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-11-15 17:07:09 (GMT)
commit0d571ed33320f761a463464e4ed2886eee487898 (patch)
tree6fbc4eff76e373879785b04dc5747a4e4f93fd9f /generic/regc_nfa.c
parentf9c7eb3572a52ec4b69ff9552d7caf55aa0e59af (diff)
downloadtcl-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]
Diffstat (limited to 'generic/regc_nfa.c')
-rw-r--r--generic/regc_nfa.c3
1 files changed, 2 insertions, 1 deletions
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;