Skip to content

Commit ea31930

Browse files
committed
one little mistake
1 parent 56eab32 commit ea31930

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/part/GptPartitionTable.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ pub fn render(table: *PartTable, stream: *dim.BinaryStream) dim.Content.RenderEr
238238
std.mem.writeInt(u64, gpt_header[0x30..0x38], max_partition_lba, .little); // Last usable LBA
239239
(table.disk_id orelse Guid.rand(random)).write(gpt_header[0x38..0x48]);
240240
std.mem.writeInt(u64, gpt_header[0x48..0x50], 2, .little); // First LBA of the partition entry array
241-
std.mem.writeInt(u32, gpt_header[0x50..0x54], 0x80, .little); // Number of partition entries
241+
std.mem.writeInt(u32, gpt_header[0x50..0x54], @intCast(table.partitions.len), .little); // Number of partition entries
242242
std.mem.writeInt(u32, gpt_header[0x54..0x58], 0x80, .little); // Size of a partition entry
243243

244244
var backup_gpt_header_block: [block_size]u8 = gpt_header_block;

0 commit comments

Comments
 (0)