mirror of
https://github.com/SerenityOS/serenity
synced 2026-04-26 01:25:22 +02:00
LibPartition: Fix end block off by one error
Previously, end block was inconsistent. GUIDPartitionTable treated end block as an inclusive bound, while MBRPartitionTable and EBRPartitionTable treated end block as an exclusive bound. Now all three treat end block as an inclusive upper bound.
This commit is contained in:
committed by
Linus Groh
parent
fb4221ad52
commit
2f8c20816e
@@ -77,7 +77,7 @@ EBRPartitionTable::EBRPartitionTable(NonnullRefPtr<Core::File> device)
|
||||
if (entry.offset == 0x00) {
|
||||
continue;
|
||||
}
|
||||
MUST(m_partitions.try_empend(entry.offset, (entry.offset + entry.length), entry.type));
|
||||
MUST(m_partitions.try_empend(entry.offset, (entry.offset + entry.length) - 1, entry.type));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user