summaryrefslogtreecommitdiff
path: root/src/wasm/wasm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm.cpp')
-rw-r--r--src/wasm/wasm.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp
index a983fc943..36eff681f 100644
--- a/src/wasm/wasm.cpp
+++ b/src/wasm/wasm.cpp
@@ -409,7 +409,12 @@ void Host::finalize() {
break;
}
case GrowMemory: {
- type = i32;
+ // if the single operand is not reachable, so are we
+ if (operands[0]->type == unreachable) {
+ type = unreachable;
+ } else {
+ type = i32;
+ }
break;
}
default: abort();