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 | f2fc66d71aabc92ba3d26c7829ebca80f69dbaa1 (patch) | |
tree | 66c896a236d631c508c6431761216027f39caf9d /args.h | |
parent | 6946b9db4429d68038c01feb0a9e209be46599a6 (diff) | |
download | txr-f2fc66d71aabc92ba3d26c7829ebca80f69dbaa1.tar.gz txr-f2fc66d71aabc92ba3d26c7829ebca80f69dbaa1.tar.bz2 txr-f2fc66d71aabc92ba3d26c7829ebca80f69dbaa1.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.
Diffstat (limited to 'args.h')
-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)); } } |