summaryrefslogtreecommitdiffstats
path: root/args.h
diff options
context:
space:
mode:
Diffstat (limited to 'args.h')
-rw-r--r--args.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/args.h b/args.h
index a0ea1743..23869d30 100644
--- a/args.h
+++ b/args.h
@@ -143,9 +143,12 @@ INLINE val args_at(struct args *args, cnum arg_index)
INLINE val args_atz(struct args *args, cnum arg_index)
{
- if (arg_index < args->fill)
+ if (arg_index < args->fill) {
return z(args->arg[arg_index]);
- return car(z(args->list));
+ } else {
+ loc l = car_l(args->list);
+ return zap(valptr(l));
+ }
}
INLINE val args_get(struct args *args, cnum *arg_index)