Index: src/wasm/encoder.cc |
diff --git a/src/wasm/encoder.cc b/src/wasm/encoder.cc |
index dd690a33f39f5f70ed7885ce0ce0d34397580915..d80a27533884401ae845ec185b385225c56361c7 100644 |
--- a/src/wasm/encoder.cc |
+++ b/src/wasm/encoder.cc |
@@ -263,7 +263,7 @@ uint32_t WasmFunctionEncoder::BodySize(void) const { |
uint32_t WasmFunctionEncoder::NameSize() const { |
- return exported_ ? static_cast<uint32_t>(name_.size()) : 0; |
+ return HasName() ? static_cast<uint32_t>(name_.size()) : 0; |
} |