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.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp
index bd83d62ed..1a6acf5bd 100644
--- a/src/wasm/wasm.cpp
+++ b/src/wasm/wasm.cpp
@@ -1194,7 +1194,8 @@ void StringMeasure::finalize() {
}
void StringEncode::finalize() {
- if (ref->type == Type::unreachable || ptr->type == Type::unreachable) {
+ if (ref->type == Type::unreachable || ptr->type == Type::unreachable ||
+ (start && start->type == Type::unreachable)) {
type = Type::unreachable;
} else {
type = Type::i32;