Attachment "684744.patch" to
ticket [684744ffff]
added by
dgp
2003-02-12 00:35:36.
Index: generic/tclParse.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclParse.c,v
retrieving revision 1.22
diff -u -r1.22 tclParse.c
--- generic/tclParse.c 5 Aug 2002 03:24:41 -0000 1.22
+++ generic/tclParse.c 11 Feb 2003 17:27:27 -0000
@@ -1646,7 +1646,7 @@
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);
Index: tests/parse.test
===================================================================
RCS file: /cvsroot/tcl/tcl/tests/parse.test,v
retrieving revision 1.8
diff -u -r1.8 parse.test
--- tests/parse.test 13 Sep 2001 11:56:20 -0000 1.8
+++ tests/parse.test 11 Feb 2003 17:27:27 -0000
@@ -727,6 +727,10 @@
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}