diff options
author | hobbs <hobbs> | 2001-07-04 00:55:08 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2001-07-04 00:55:08 (GMT) |
commit | 893bf2d7b57d2d24829763e5e74770369238efa4 (patch) | |
tree | c07a204a0f8c3841fd154538549ae1e564c551f7 /generic/tclVar.c | |
parent | 0962ee532bf11303e62d73a81dcc1d8aa8ef7377 (diff) | |
download | tcl-893bf2d7b57d2d24829763e5e74770369238efa4.zip tcl-893bf2d7b57d2d24829763e5e74770369238efa4.tar.gz tcl-893bf2d7b57d2d24829763e5e74770369238efa4.tar.bz2 |
* tests/var.test:
* generic/tclVar.c (Tcl_VariableObjCmd): added patch to check for
number of args. [Patch #426038]
Diffstat (limited to 'generic/tclVar.c')
-rw-r--r-- | generic/tclVar.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c index 799c5ae..ba76f00 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.34 2001/07/03 23:38:58 hobbs Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.35 2001/07/04 00:55:08 hobbs Exp $ */ #include "tclInt.h" @@ -4072,6 +4072,11 @@ Tcl_VariableObjCmd(dummy, interp, objc, objv) Tcl_Obj *varValuePtr; int i, result; + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "?name value...? name ?value?"); + return TCL_ERROR; + } + for (i = 1; i < objc; i = i+2) { /* * Look up each variable in the current namespace context, creating |