summaryrefslogtreecommitdiffstats
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hash.c b/hash.c
index 6a4143d6..55906c2e 100644
--- a/hash.c
+++ b/hash.c
@@ -1008,8 +1008,10 @@ val hash_update(val hash, val fun)
{
val iter = hash_begin(hash);
val cell;
- while ((cell = hash_next(iter)) != nil)
- rplacd(cell, funcall1(fun, cdr(cell)));
+ while ((cell = hash_next(iter)) != nil) {
+ val *loc = cdr_l(cell);
+ set(*loc, funcall1(fun, *loc));
+ }
return hash;
}