Tcl Source Code

Artifact [ca4081e2af]
Login

Artifact ca4081e2afdd5c02af3eaf44eb8cc0912fe8c1b8:

Attachment "1732414.patch" to ticket [1732414fff] added by msofer 2007-06-07 06:08:05.
Index: generic/tclParse.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclParse.c,v
retrieving revision 1.53
diff -u -r1.53 tclParse.c
--- generic/tclParse.c	30 May 2007 18:12:59 -0000	1.53
+++ generic/tclParse.c	6 Jun 2007 22:45:52 -0000
@@ -460,9 +460,10 @@
 		 * list elements.
 		 */
 		 
-		while ((code == TCL_OK) && (nextElem < listEnd)) {
+		while (nextElem < listEnd) {
 		    code = TclFindElement(NULL, nextElem, listEnd - nextElem,
 			    &elemStart, &nextElem, NULL, NULL);
+		    if (code != TCL_OK) break;
 		    if (elemStart < listEnd) {
 			elemCount++;
 		    }