Index: src/wasm/wasm-module-builder.cc |
diff --git a/src/wasm/wasm-module-builder.cc b/src/wasm/wasm-module-builder.cc |
index 73f68e891f6b5a5c457b10ff97cbe92340dd7b11..b1b859ba42cbd9c0d63b2c0950869760a7f8b42b 100644 |
--- a/src/wasm/wasm-module-builder.cc |
+++ b/src/wasm/wasm-module-builder.cc |
@@ -190,10 +190,9 @@ |
body_.resize(position); |
return; |
} |
- DCHECK_LE(position, body_.size()); |
size_t len = body_.size() - position; |
dst->resize(len); |
- memcpy(dst->data(), body_.data() + position, len); |
+ memcpy(dst->data(), &body_[position], len); |
body_.resize(position); |
} |