diff options
author | stanton <stanton> | 1998-12-03 23:59:33 (GMT) |
---|---|---|
committer | stanton <stanton> | 1998-12-03 23:59:33 (GMT) |
commit | 9f44097409d21f199dc6ef63bd79a33bc6d64c2f (patch) | |
tree | 8421741ed53946bc691b2be3f0233d1324d383c3 /generic/tclUtil.c | |
parent | 004161fd112c24bf2a346f308456b9dcdd3c3c9b (diff) | |
download | tcl-9f44097409d21f199dc6ef63bd79a33bc6d64c2f.zip tcl-9f44097409d21f199dc6ef63bd79a33bc6d64c2f.tar.gz tcl-9f44097409d21f199dc6ef63bd79a33bc6d64c2f.tar.bz2 |
* generic/tclUtil.c (Tcl_StringMatch): Changed to match 8.0
behavior in corner case where there is no closing bracket.
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r-- | generic/tclUtil.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 9fe3e3f..7711321 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.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: tclUtil.c,v 1.1.2.3 1998/11/11 04:54:21 stanton Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.1.2.4 1998/12/03 23:59:33 stanton Exp $ */ #include "tclInt.h" @@ -1106,6 +1106,7 @@ Tcl_StringMatch(string, pattern) * characters. */ { int p, s; + CONST char *pstart = pattern; while (1) { p = *pattern; @@ -1198,7 +1199,8 @@ Tcl_StringMatch(string, pattern) } while (*pattern != ']') { if (*pattern == '\0') { - return 0; + pattern = Tcl_UtfPrev(pattern, pstart); + break; } pattern++; } |