summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wasm/wasm.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp
index c2df2c68c..9bc0f6e0b 100644
--- a/src/wasm/wasm.cpp
+++ b/src/wasm/wasm.cpp
@@ -1249,7 +1249,9 @@ void RefAs::finalize() {
void StringNew::finalize() {
if (ptr->type == Type::unreachable ||
- (length && length->type == Type::unreachable)) {
+ (length && length->type == Type::unreachable) ||
+ (start && start->type == Type::unreachable) ||
+ (end && end->type == Type::unreachable)) {
type = Type::unreachable;
} else {
type = Type(HeapType::string, try_ ? Nullable : NonNullable);