summaryrefslogtreecommitdiffstats
path: root/generic/tclRegexp.c
diff options
context:
space:
mode:
authorstanton <stanton>1999-05-22 01:20:10 (GMT)
committerstanton <stanton>1999-05-22 01:20:10 (GMT)
commitac39508cf97576cd9747c5630c4a13d794663b4a (patch)
tree4b7c61e6c670f227cf4d603907157fb6246d2d50 /generic/tclRegexp.c
parent21bd132482f68735f5a4381934f56ee911904e87 (diff)
downloadtcl-ac39508cf97576cd9747c5630c4a13d794663b4a.zip
tcl-ac39508cf97576cd9747c5630c4a13d794663b4a.tar.gz
tcl-ac39508cf97576cd9747c5630c4a13d794663b4a.tar.bz2
Merged changes from scriptics-tclpro-1-3-b2 branch
Diffstat (limited to 'generic/tclRegexp.c')
-rw-r--r--generic/tclRegexp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c
index 3ae0c16..22e1db0 100644
--- a/generic/tclRegexp.c
+++ b/generic/tclRegexp.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclRegexp.c,v 1.4 1999/05/14 02:04:05 stanton Exp $
+ * RCS: @(#) $Id: tclRegexp.c,v 1.5 1999/05/22 01:20:13 stanton Exp $
*/
#include "tclInt.h"
@@ -751,7 +751,7 @@ CompileRegexp(interp, string, length, flags)
* a regexp if it has the same pattern and the same flags.
*/
- for (i = 0; i < NUM_REGEXPS; i++) {
+ for (i = 0; (i < NUM_REGEXPS) && (tsdPtr->patterns[i] != NULL); i++) {
if ((length == tsdPtr->patLengths[i])
&& (tsdPtr->regexps[i]->flags == flags)
&& (strcmp(string, tsdPtr->patterns[i]) == 0)) {