summaryrefslogtreecommitdiff
path: root/src/wasm2asm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm2asm.h')
-rw-r--r--src/wasm2asm.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/wasm2asm.h b/src/wasm2asm.h
index c2e1141d1..89f33381a 100644
--- a/src/wasm2asm.h
+++ b/src/wasm2asm.h
@@ -481,12 +481,7 @@ Ref Wasm2AsmBuilder::processFunctionBody(Expression* curr, IString result) {
flattenAppend(ret, ValueBuilder::makeStatement(visit(curr->list[i], NO_RESULT)));
}
if (result != NO_RESULT) {
- ret[1]->push_back(ValueBuilder::makeStatement(
- ValueBuilder::makeAssign(
- result,
- visit(curr->list[size-1], result)
- )
- ));
+ flattenAppend(ret, visitAndAssign(curr->list[size-1], result));
}
if (curr->name.is()) {
ret = ValueBuilder::makeLabel(fromName(curr->name), ret);