aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2013-08-18 08:58:01 +1000
committerSteve Bennett <steveb@workware.net.au>2013-08-18 08:58:27 +1000
commit1f358af409820108d70303b6ab44dc63fa5f291f (patch)
treea9c1cb53bb914d7488a2e35c6de3ccffd49f4037
parent6b2555bd8fa569c2ac1c320e657d3eda8973874f (diff)
downloadjimtcl-1f358af409820108d70303b6ab44dc63fa5f291f.zip
jimtcl-1f358af409820108d70303b6ab44dc63fa5f291f.tar.gz
jimtcl-1f358af409820108d70303b6ab44dc63fa5f291f.tar.bz2
[local] requires at least one argument
Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r--jim.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/jim.c b/jim.c
index 144121a..e3ee2cd 100644
--- a/jim.c
+++ b/jim.c
@@ -13062,6 +13062,11 @@ static int Jim_LocalCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *ar
{
int retcode;
+ if (argc < 2) {
+ Jim_WrongNumArgs(interp, 1, argv, "cmd ?args ...?");
+ return JIM_ERR;
+ }
+
/* Evaluate the arguments with 'local' in force */
interp->local++;
retcode = Jim_EvalObjVector(interp, argc - 1, argv + 1);