| ... | @@ -820,7 +820,7 @@ pub fn finish(f: *Flush, wasm: *Wasm) !void { | ... | @@ -820,7 +820,7 @@ pub fn finish(f: *Flush, wasm: *Wasm) !void { |
| 820 | } | 820 | } |
| 821 | | 821 | |
| 822 | // When the shared-memory option is enabled, we *must* emit the 'data count' section. | 822 | // When the shared-memory option is enabled, we *must* emit the 'data count' section. |
| 823 | { | 823 | if (f.data_segment_groups.items.len > 0) { |
| 824 | const header_offset = try reserveVecSectionHeader(gpa, binary_bytes); | 824 | const header_offset = try reserveVecSectionHeader(gpa, binary_bytes); |
| 825 | replaceVecSectionHeader(binary_bytes, header_offset, .data_count, @intCast(f.data_segment_groups.items.len)); | 825 | replaceVecSectionHeader(binary_bytes, header_offset, .data_count, @intCast(f.data_segment_groups.items.len)); |
| 826 | } | 826 | } |