summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wasm-binary.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index 85aaf9279..9dd0d60d6 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -1714,8 +1714,8 @@ public:
}
// now that we have names for each function, apply things
- if (startIndex != static_cast<Index>(-1) && startIndex < wasm.functions.size()) {
- wasm.start = wasm.functions[startIndex]->name;
+ if (startIndex != static_cast<Index>(-1)) {
+ wasm.start = getFunctionIndexName(startIndex);
}
for (auto& iter : exportIndexes) {