summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
Diffstat (limited to 'mi')
-rw-r--r--mi/flatten.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mi/flatten.c b/mi/flatten.c
index fd1c389..fa4bdc1 100644
--- a/mi/flatten.c
+++ b/mi/flatten.c
@@ -441,14 +441,16 @@ compare(Flattenctx *s, Node *n, int fields)
static Node *
assign(Flattenctx *s, Node *lhs, Node *rhs)
{
- Node *r, *t, *u;
+ Node *r, *t, *e, *u;
if (exprop(lhs) == Otup) {
r = destructure(s, lhs, rhs);
} else if (tybase(exprtype(lhs))->type != Tyvoid) {
t = lval(s, lhs);
u = rval(s, rhs);
- r = asn(t, u);
+ e = asn(t, u);
+ append(s, e);
+ r = t;
} else {
r = rval(s, rhs);
}