mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
OcFileLib: Correct partition index
This commit is contained in:
parent
c8545a2564
commit
1981d037c1
@ -574,7 +574,8 @@ OcGetGptPartitionEntry (
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Offset = ((UINTN)HdNode->PartitionNumber * Partitions->PartitionEntrySize);
|
||||
ASSERT (HdNode->PartitionNumber > 0);
|
||||
Offset = ((UINTN)(HdNode->PartitionNumber - 1) * Partitions->PartitionEntrySize);
|
||||
PartEntry = (EFI_PARTITION_ENTRY *)((UINTN)Partitions->FirstEntry + Offset);
|
||||
//
|
||||
// FIXME: This causes the handle to be dangling if the device is detached.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user