ignore empty clusters when finding next one

Change-Id: I7478e6428c8383a1d05a91e9a44b6d1ee1335da7
This commit is contained in:
matthewjheaney
2010-11-12 13:30:47 -05:00
parent c62b9f8a21
commit 1e6c5cbaf7

View File

@@ -3125,7 +3125,7 @@ long Track::GetNext(
pNextEntry = pCluster->GetNext(pCurrEntry); pNextEntry = pCluster->GetNext(pCurrEntry);
for (int i = 0; i < 100; ++i) //arbitrary upper bound to search for (int i = 0; ; )
{ {
while (pNextEntry) while (pNextEntry)
{ {
@@ -3171,6 +3171,14 @@ long Track::GetNext(
} }
pNextEntry = pCluster->GetFirst(); pNextEntry = pCluster->GetFirst();
if (pNextEntry == NULL) //empty cluster
continue;
++i;
if (i >= 100)
break;
} }
//NOTE: if we get here, it means that we didn't find a block with //NOTE: if we get here, it means that we didn't find a block with