We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7926818 + ab465fa commit 2c60fa8Copy full SHA for 2c60fa8
sources/OpenMcdf/CompoundFile.cs
@@ -1325,12 +1325,15 @@ int nextSecID
1325
1326
private void EnsureUniqueSectorIndex(int nextSecID, HashSet<int> processedSectors)
1327
{
1328
- if (processedSectors.Contains(nextSecID) && this.validationExceptionEnabled)
+ if (!this.validationExceptionEnabled)
1329
1330
- throw new CFCorruptedFileException("The file is corrupted.");
+ return;
1331
}
1332
1333
- processedSectors.Add(nextSecID);
+ if (!processedSectors.Add(nextSecID))
1334
+ {
1335
+ throw new CFCorruptedFileException("The file is corrupted.");
1336
+ }
1337
1338
1339
/// <summary>
0 commit comments