summaryrefslogtreecommitdiffstats
path: root/generic/tclParse.c
diff options
context:
space:
mode:
authorhobbs <hobbs>1999-07-30 22:19:10 (GMT)
committerhobbs <hobbs>1999-07-30 22:19:10 (GMT)
commit77a242e5abd03ab238d92c84e7093a78b87e25c8 (patch)
treeef5d0dba9c60829a6b26adf180ec8505877e79db /generic/tclParse.c
parent901e9cf34bd3ae9044d9934d2d433263a6795eff (diff)
downloadtcl-77a242e5abd03ab238d92c84e7093a78b87e25c8.zip
tcl-77a242e5abd03ab238d92c84e7093a78b87e25c8.tar.gz
tcl-77a242e5abd03ab238d92c84e7093a78b87e25c8.tar.bz2
* tclParse.c: fixed bug in info complete regarding nested square
brackets [Bug: 2382, 2466]
Diffstat (limited to 'generic/tclParse.c')
-rw-r--r--generic/tclParse.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c
index df5412f..cef7d66 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclParse.c,v 1.10 1999/07/23 23:40:29 redman Exp $
+ * RCS: @(#) $Id: tclParse.c,v 1.11 1999/07/30 22:19:20 hobbs Exp $
*/
#include "tclInt.h"
@@ -260,6 +260,7 @@ Tcl_ParseCommand(interp, string, numBytes, nested, parsePtr)
parsePtr->tokensAvailable = NUM_STATIC_TOKENS;
parsePtr->string = string;
parsePtr->end = string + numBytes;
+ parsePtr->term = parsePtr->end;
parsePtr->interp = interp;
parsePtr->incomplete = 0;
parsePtr->errorType = TCL_PARSE_SUCCESS;
@@ -372,6 +373,7 @@ Tcl_ParseCommand(interp, string, numBytes, nested, parsePtr)
break;
}
if ((type & terminators) != 0) {
+ parsePtr->term = src;
src++;
break;
}
@@ -455,6 +457,7 @@ Tcl_ParseCommand(interp, string, numBytes, nested, parsePtr)
}
if ((type & terminators) != 0) {
+ parsePtr->term = src;
src++;
break;
}
@@ -607,7 +610,7 @@ ParseTokens(src, mask, parsePtr)
if (nested.tokenPtr != nested.staticTokens) {
ckfree((char *) nested.tokenPtr);
}
- if ((src[-1] == ']') && !nested.incomplete) {
+ if ((*nested.term == ']') && !nested.incomplete) {
break;
}
if (src == parsePtr->end) {