summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-binary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-binary.cpp')
-rw-r--r--src/wasm/wasm-binary.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp
index 924bf1601..e08644eae 100644
--- a/src/wasm/wasm-binary.cpp
+++ b/src/wasm/wasm-binary.cpp
@@ -3700,7 +3700,7 @@ void WasmBinaryReader::readNames(size_t payloadLen) {
auto rawName = getInlineString();
auto name = processor.process(rawName);
if (index < wasm.dataSegments.size()) {
- wasm.dataSegments[i]->setExplicitName(name);
+ wasm.dataSegments[index]->setExplicitName(name);
} else {
std::cerr << "warning: data index out of bounds in name section, "
"data subsection: "