commit a29d9e01a68ebf4bfa8dd66452358cb3610ee46d
parent 25a0f102da79b5900757140865be17f248aec065
Author: sin <sin@2f30.org>
Date: Fri, 16 May 2014 11:41:53 +0100
Bomb out on multiple arguments to boolean
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/parser.c b/parser.c
@@ -334,7 +334,7 @@ evaldefine(struct object *o)
if (!caddr(o))
return error("expected sexpression");
if (cadddr(o))
- return error("multiple arguments to define");
+ return error("multiple arguments");
val = eval(caddr(o));
if (val->type == OError)
return val;
@@ -398,7 +398,7 @@ evalset(struct object *o)
if (!caddr(o))
return error("expected sexpression");
if (cadddr(o))
- return error("multiple arguments to set");
+ return error("multiple arguments");
val = eval(caddr(o));
if (val->type == OError)
return val;
@@ -419,6 +419,8 @@ evalboolean(struct object *o)
arg = eval(cadr(o));
if (arg->type == OError)
return arg;
+ if (caddr(o))
+ return error("multiple arguments");
if (arg->type == OBoolean)
return boolean(true);
return boolean(false);