diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-11-15 05:49:16 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-11-15 05:49:16 -0800 |
commit | 2a759fd4c5ea072b2f19c7cc6e4fe9a99dc8ed44 (patch) | |
tree | 66c896a236d631c508c6431761216027f39caf9d | |
parent | 677a9b614e5c8aaf993727aee681ae4513db3f51 (diff) | |
download | txr-2a759fd4c5ea072b2f19c7cc6e4fe9a99dc8ed44.tar.gz txr-2a759fd4c5ea072b2f19c7cc6e4fe9a99dc8ed44.tar.bz2 txr-2a759fd4c5ea072b2f19c7cc6e4fe9a99dc8ed44.zip |
Fix bad mutation in arg handling.
* args.h (args_atz): Do not zap the car field
of the first list cons; rather, zap the list itself.
The list shouldn't be modified because in apply
calls, it is a data structure belonging to the
caller.
-rw-r--r-- | args.h | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -164,8 +164,7 @@ INLINE val args_atz(struct args *args, cnum arg_index) if (arg_index < args->fill) { return z(args->arg[arg_index]); } else { - loc l = car_l(args->list); - return zap(valptr(l)); + return car(z(args->list)); } } |