summaryrefslogtreecommitdiff
path: root/src/binary-writer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/binary-writer.cc')
-rw-r--r--src/binary-writer.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/binary-writer.cc b/src/binary-writer.cc
index 54ba2fcb..687b117d 100644
--- a/src/binary-writer.cc
+++ b/src/binary-writer.cc
@@ -820,8 +820,8 @@ Result BinaryWriter::WriteModule(const Module* module) {
EndSection();
}
- if (module->start) {
- Index start_func_index = module->GetFuncIndex(*module->start);
+ if (module->starts.size()) {
+ Index start_func_index = module->GetFuncIndex(*module->starts[0]);
if (start_func_index != kInvalidIndex) {
BeginKnownSection(BinarySection::Start, LEB_SECTION_SIZE_GUESS);
WriteU32Leb128(stream_, start_func_index, "start func index");