Tcl Source Code

Artifact [42b9f3a3f8]
Login

Artifact 42b9f3a3f85476fed4327437c79e986a4143d019:

Attachment "fixempties.patch" to ticket [1832612fff] added by dgp 2007-11-16 00:03:34.
Index: generic/regc_nfa.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/regc_nfa.c,v
retrieving revision 1.8
diff -u -r1.8 regc_nfa.c
--- generic/regc_nfa.c	14 Nov 2007 11:04:59 -0000	1.8
+++ generic/regc_nfa.c	15 Nov 2007 17:01:22 -0000
@@ -1133,7 +1133,8 @@
 
     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;