summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclInterp.c12
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.