aboutsummaryrefslogtreecommitdiffstats
path: root/interpret.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-11-15 22:03:23 +0200
committerArnold D. Robbins <arnold@skeeve.com>2017-11-15 22:03:23 +0200
commitd676b8b3b9b11efbd2c43e87a166c52a183842ce (patch)
tree7be466b76d1dc60b3a25abcbf131fe002a080066 /interpret.h
parent7b2e99aec44f88d10508cd56598112190397bb93 (diff)
parent303608bfc4219fbc94bda64e401f8a544db932e1 (diff)
downloadegawk-d676b8b3b9b11efbd2c43e87a166c52a183842ce.tar.gz
egawk-d676b8b3b9b11efbd2c43e87a166c52a183842ce.tar.bz2
egawk-d676b8b3b9b11efbd2c43e87a166c52a183842ce.zip
Merge branch 'master' into feature/fix-comments
Diffstat (limited to 'interpret.h')
-rw-r--r--interpret.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/interpret.h b/interpret.h
index 166a11e1..4b140c28 100644
--- a/interpret.h
+++ b/interpret.h
@@ -699,11 +699,16 @@ mod:
lhs = r_get_field(t1, & assign, false);
decr_sp();
DEREF(t1);
+ /*
+ * N.B. We must call assign() before unref, since
+ * we may need to copy $n values before freeing the
+ * $0 buffer.
+ */
+ assert(assign != NULL);
+ assign();
unref(*lhs);
r = POP_SCALAR();
UNFIELD(*lhs, r);
- assert(assign != NULL);
- assign();
}
break;