diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2003-02-11 18:03:22 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2003-02-11 18:03:22 (GMT) |
commit | ae07e289b2b5cd44065d2a1d64003a56c3071977 (patch) | |
tree | a0b387eca988334fa5fb08fce0606a19d253cdc8 | |
parent | efc50f268e80406cfd5058b3a67014803a71dad2 (diff) | |
download | tcl-ae07e289b2b5cd44065d2a1d64003a56c3071977.zip tcl-ae07e289b2b5cd44065d2a1d64003a56c3071977.tar.gz tcl-ae07e289b2b5cd44065d2a1d64003a56c3071977.tar.bz2 |
* generic/tclParse.c
* tests/parse.test: fix for [Bug 684744], by Don Porter.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tclParse.c | 4 | ||||
-rw-r--r-- | tests/parse.test | 6 |
3 files changed, 12 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2003-02-11 Miguel Sofer <msofer@users.sf.net> + + * generic/tclParse.c + * tests/parse.test: fix for [Bug 684744], by Don Porter. + 2003-02-11 Jeff Hobbs <jeffh@ActiveState.com> * generic/tclIOUtil.c (Tcl_FSJoinPath, Tcl_FSGetNormalizedPath): diff --git a/generic/tclParse.c b/generic/tclParse.c index 230edee..f1ffec7 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.22 2002/08/05 03:24:41 dgp Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.23 2003/02/11 18:03:27 msofer Exp $ */ #include "tclInt.h" @@ -1646,7 +1646,7 @@ CommandComplete(script, numBytes) while (Tcl_ParseCommand((Tcl_Interp *) NULL, p, end - p, 0, &parse) == TCL_OK) { p = parse.commandStart + parse.commandSize; - if (*p == 0) { + if (p == end) { break; } Tcl_FreeParse(&parse); diff --git a/tests/parse.test b/tests/parse.test index 472e5d4..5f1ee4a 100644 --- a/tests/parse.test +++ b/tests/parse.test @@ -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: parse.test,v 1.8 2001/09/13 11:56:20 msofer Exp $ +# RCS: @(#) $Id: parse.test,v 1.9 2003/02/11 18:03:28 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -727,6 +727,10 @@ test parse-15.57 {CommandComplete procedure} { test parse-15.58 {CommandComplete procedure, memory leaks} { info complete "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22" } 1 +test parse-15.58 {CommandComplete procedure} { + # Test for Tcl Bug 684744 + info complete [encoding convertfrom identity "\x00;if 1 \{"] +} 0 test parse-16.1 {Tcl_EvalEx, check termOffset is set correctly for non TCL_OK cases, bug 2535} { subst {[eval {return foo}]bar} |