diff options
Diffstat (limited to 'src/binary-writer.cc')
-rw-r--r-- | src/binary-writer.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/binary-writer.cc b/src/binary-writer.cc index e9b04b0c..543d8a7d 100644 --- a/src/binary-writer.cc +++ b/src/binary-writer.cc @@ -1066,7 +1066,7 @@ Result BinaryWriter::WriteModule() { uint8_t flags = segment->GetFlags(module_); stream_->WriteU8(flags, "segment flags"); // 2. optional target table - if (flags & SegExplicitIndex) { + if (flags & SegExplicitIndex && segment->kind != SegmentKind::Declared) { WriteU32Leb128(stream_, module_->GetTableIndex(segment->table_var), "table index"); } |