summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/asm2wasm.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h
index 2d0d1300e..4d2ddb0cd 100644
--- a/src/asm2wasm.h
+++ b/src/asm2wasm.h
@@ -1277,7 +1277,9 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) {
}
abort_on("bad unary", ast);
} else if (what == IF) {
- return builder.makeIf(process(ast[1]), process(ast[2]), !!ast[3] ? process(ast[3]) : nullptr);
+ auto* condition = process(ast[1]);
+ auto* ifTrue = process(ast[2]);
+ return builder.makeIf(condition, ifTrue, !!ast[3] ? process(ast[3]) : nullptr);
} else if (what == CALL) {
if (ast[1][0] == NAME) {
IString name = ast[1][1]->getIString();