diff options
author | Bill Yi <byi@google.com> | 2021-01-05 18:27:49 -0800 |
---|---|---|
committer | Bill Yi <byi@google.com> | 2021-01-05 18:27:49 -0800 |
commit | da4b51ba32bf28ffc5c47ca290ee920b030a7f72 (patch) | |
tree | 2a3d4a6e943e19889957188c2fad2bf247321b31 | |
parent | 5c854db65c5446950a4a213e874fd08b9378ecf9 (diff) | |
parent | fc7489973cccb411e2472963801e652ca1500ab5 (diff) | |
download | gptfdisk-da4b51ba32bf28ffc5c47ca290ee920b030a7f72.tar.gz |
Merge RQ1A.210105.003 to aosp-master - DO NOT MERGE
Merged-In: I77e4f30cdea1d0e938a0693d70b27796294a75be
Change-Id: I45d2d1b2b51d7714187d23adc9a77ea70fe8581a
-rw-r--r-- | basicmbr.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/basicmbr.cc b/basicmbr.cc index 8ac9789..e9ac5c5 100644 --- a/basicmbr.cc +++ b/basicmbr.cc @@ -292,7 +292,8 @@ int BasicMBRData::ReadLogicalParts(uint64_t extendedStart, int partNum) { if (EbrLocations[i] == offset) { // already read this one; infinite logical partition loop! cerr << "Logical partition infinite loop detected! This is being corrected.\n"; allOK = -1; - partNum -= 1; + if(partNum > 0) //don't go negative + partNum -= 1; } // if } // for EbrLocations[partNum] = offset; |