diff options
Diffstat (limited to 'src/wasm/wasm.cpp')
-rw-r--r-- | src/wasm/wasm.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp index 0a3ca1929..eceb4585b 100644 --- a/src/wasm/wasm.cpp +++ b/src/wasm/wasm.cpp @@ -1175,7 +1175,8 @@ void RefAs::finalize() { } void StringNew::finalize() { - if (ptr->type == Type::unreachable || length->type == Type::unreachable) { + if (ptr->type == Type::unreachable || + (length && length->type == Type::unreachable)) { type = Type::unreachable; } else { type = Type(HeapType::string, NonNullable); |