summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2003-11-24 19:06:07 (GMT)
committerdgp <dgp@users.sourceforge.net>2003-11-24 19:06:07 (GMT)
commit158d77b8cba72fb076672d1e53581c432eeb517c (patch)
tree474038e35fbcf4a5debb8dfaf4cf0aae3922b8d0 /generic
parent9b685dfb73cdf1260d125dc254daf63a294e0687 (diff)
downloadtcl-158d77b8cba72fb076672d1e53581c432eeb517c.zip
tcl-158d77b8cba72fb076672d1e53581c432eeb517c.tar.gz
tcl-158d77b8cba72fb076672d1e53581c432eeb517c.tar.bz2
* generic/tclParse.c: Corrected faulty check for trailing white
space in {expand} parsing. Thanks Andreas Leitgeb. [Bug 848262]. * tests/parse.test: New tests for the bug.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclParse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c
index e86a7d4..2923642 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -13,7 +13,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.30 2003/11/15 03:19:17 dgp Exp $
+ * RCS: @(#) $Id: tclParse.c,v 1.31 2003/11/24 19:06:08 dgp Exp $
*/
#include "tclInt.h"
@@ -360,7 +360,9 @@ parseWord:
&& (0 == strncmp(expPfx,expPtr->start,expPfxLen))
/* Is the prefix */
&& (numBytes > 0)
- && (0 == TclParseWhiteSpace(termPtr, 1, parsePtr, &type))
+ && (TclParseWhiteSpace(termPtr, numBytes, parsePtr, &type)
+ == 0)
+ && (type != TYPE_COMMAND_END)
/* Non-whitespace follows */
) {
expandWord = 1;