summaryrefslogtreecommitdiffstats
path: root/generic/regcomp.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2003-11-17 18:12:07 (GMT)
committerdgp <dgp@users.sourceforge.net>2003-11-17 18:12:07 (GMT)
commitfa21483afb1b8a95e33287eaa28f20f0bb319d40 (patch)
treee29fd69d2797dd44088bff0bc55f109b06ea7179 /generic/regcomp.c
parent8a337db141701521a51b0fbdeed2ec76f4557129 (diff)
downloadtcl-fa21483afb1b8a95e33287eaa28f20f0bb319d40.zip
tcl-fa21483afb1b8a95e33287eaa28f20f0bb319d40.tar.gz
tcl-fa21483afb1b8a95e33287eaa28f20f0bb319d40.tar.bz2
* generic/regcomp.c: Backported regexp bug fixes and tests. Thanks
* generic/tclTest.c: to Pavel Goran and Vince Darley. * tests/reg.test: [Bugs 230589, 504785, 505048, 703709, 840258]
Diffstat (limited to 'generic/regcomp.c')
-rw-r--r--generic/regcomp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/regcomp.c b/generic/regcomp.c
index 4aba629..2a7fd6e 100644
--- a/generic/regcomp.c
+++ b/generic/regcomp.c
@@ -553,8 +553,12 @@ struct nfa *nfa;
if (b->from != pre)
break;
if (b != NULL) { /* must be split */
- s->tmp = slist;
- slist = s;
+ if (s->tmp == NULL) { /* if not already in the list */
+ /* (fixes bugs 505048, 230589, */
+ /* 840258, 504785) */
+ s->tmp = slist;
+ slist = s;
+ }
}
}