diff options
Diffstat (limited to 'src/wasm/wasm.cpp')
-rw-r--r-- | src/wasm/wasm.cpp | 7 |
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(); |