diff options
author | mistachkin <mistachkin@noemail.net> | 2009-02-06 00:59:58 (GMT) |
---|---|---|
committer | mistachkin <mistachkin@noemail.net> | 2009-02-06 00:59:58 (GMT) |
commit | 6a723dee9f815e21f55db8b6b553c35f85894315 (patch) | |
tree | eb8a7ba5cf1e96616aadf62b2dc5a9d7db0e1df8 /generic/tclInterp.c | |
parent | 046b2897a9712f298fc54653f9b7db8dcc3a6848 (diff) | |
download | tcl-6a723dee9f815e21f55db8b6b553c35f85894315.zip tcl-6a723dee9f815e21f55db8b6b553c35f85894315.tar.gz tcl-6a723dee9f815e21f55db8b6b553c35f85894315.tar.bz2 |
Fix for [Bug 2544618]
FossilOrigin-Name: bdd187e3def36a3b10137df8ca6249736a941264
Diffstat (limited to 'generic/tclInterp.c')
-rw-r--r-- | generic/tclInterp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclInterp.c b/generic/tclInterp.c index c6b53c0..643b7e0 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.102 2009/02/02 06:02:41 dgp Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.103 2009/02/06 01:00:00 mistachkin Exp $ */ #include "tclInt.h" @@ -652,11 +652,6 @@ Tcl_InterpObjCmd( OPT_UNWIND, OPT_LAST }; - if (objc > 6) { - Tcl_WrongNumArgs(interp, 2, objv, "?-unwind? ?--? ?path? ?result?"); - return TCL_ERROR; - } - flags = 0; for (i = 2; i < objc; i++) { @@ -684,6 +679,11 @@ Tcl_InterpObjCmd( endOfForLoop: + if ((i + 2) < objc) { + Tcl_WrongNumArgs(interp, 2, objv, "?-unwind? ?--? ?path? ?result?"); + return TCL_ERROR; + } + /* * Did they specify a slave interp to cancel the script in * progress in? If not, use the current interp. |