Fixed a major bug that caused improper partition tables to be created.

Version 1.0.3 release.
This commit is contained in:
Rod Smith
2017-07-27 21:59:14 -04:00
parent eed1122809
commit f1f6236fb4
8 changed files with 17 additions and 9 deletions

1
gpt.cc
View File

@@ -1924,6 +1924,7 @@ int GPTData::ClearGPTData(void) {
mainHeader.currentLBA = UINT64_C(1);
mainHeader.partitionEntriesLBA = (uint64_t) 2;
mainHeader.sizeOfPartitionEntries = GPT_SIZE;
mainHeader.firstUsableLBA = GetTableSizeInSectors() + mainHeader.partitionEntriesLBA;
for (i = 0; i < GPT_RESERVED; i++) {
mainHeader.reserved2[i] = '\0';
} // for