aboutsummaryrefslogtreecommitdiffstats
path: root/interpret.h
diff options
context:
space:
mode:
Diffstat (limited to 'interpret.h')
-rw-r--r--interpret.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/interpret.h b/interpret.h
index 6cfff3a6..4a7979bd 100644
--- a/interpret.h
+++ b/interpret.h
@@ -741,7 +741,10 @@ mod:
if (t1 != *lhs) {
unref(*lhs);
- *lhs = dupnode(t1);
+ if (t1->valref == 1)
+ *lhs = t1;
+ else
+ *lhs = dupnode(t1);
}
if (t1 != t2 && t1->valref == 1 && (t1->flags & (MALLOC|MPFN|MPZN)) == MALLOC) {