diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclScan.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/generic/tclScan.c b/generic/tclScan.c index 3d7b37e..bf238cf 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclScan.c,v 1.5 1999/11/19 06:34:24 hobbs Exp $ + * RCS: @(#) $Id: tclScan.c,v 1.6 1999/11/30 01:42:59 hobbs Exp $ */ #include "tclInt.h" @@ -810,6 +810,12 @@ Tcl_ScanObjCmd(dummy, interp, objc, objv) } ReleaseCharSet(&cset); + if (string == end) { + /* + * Nothing matched the range, stop processing + */ + goto done; + } if (!(flags & SCAN_SUPPRESS)) { objPtr = Tcl_NewStringObj(string, end-string); Tcl_IncrRefCount(objPtr); |