| Index: src/wasm/wasm-module.h
|
| diff --git a/src/wasm/wasm-module.h b/src/wasm/wasm-module.h
|
| index 0438dba7c275ab264a4af6723663b82f12f3cb3b..f67919ef88033660e6544fcf41b89a972327b14f 100644
|
| --- a/src/wasm/wasm-module.h
|
| +++ b/src/wasm/wasm-module.h
|
| @@ -202,7 +202,7 @@ struct WasmModule {
|
|
|
| // Get a string stored in the module bytes representing a name.
|
| WasmName GetNameOrNull(uint32_t offset, uint32_t length) const {
|
| - if (length == 0) return {NULL, 0}; // no name.
|
| + if (offset == 0 && length == 0) return {NULL, 0}; // no name.
|
| CHECK(BoundsCheck(offset, offset + length));
|
| DCHECK_GE(static_cast<int>(length), 0);
|
| return {reinterpret_cast<const char*>(module_start + offset),
|
|
|