This commit is contained in:
Igor Pavlov
2016-05-20 00:00:00 +00:00
committed by Kornel Lesiński
parent 66ac98bb02
commit bec3b479dc
88 changed files with 972 additions and 753 deletions

View File

@@ -186,18 +186,24 @@ public:
UInt64 GetFolder(unsigned fileIndex) const
{
const CItem &item = Items[Indices[fileIndex]];
const CSectionInfo &section = Sections[(unsigned)item.Section];
if (section.IsLzx())
return section.Methods[0].LzxInfo.GetFolder(item.Offset);
if (item.Section < Sections.Size())
{
const CSectionInfo &section = Sections[(unsigned)item.Section];
if (section.IsLzx())
return section.Methods[0].LzxInfo.GetFolder(item.Offset);
}
return 0;
}
UInt64 GetLastFolder(unsigned fileIndex) const
{
const CItem &item = Items[Indices[fileIndex]];
const CSectionInfo &section = Sections[(unsigned)item.Section];
if (section.IsLzx())
return section.Methods[0].LzxInfo.GetFolder(item.Offset + item.Size - 1);
if (item.Section < Sections.Size())
{
const CSectionInfo &section = Sections[(unsigned)item.Section];
if (section.IsLzx())
return section.Methods[0].LzxInfo.GetFolder(item.Offset + item.Size - 1);
}
return 0;
}
@@ -217,6 +223,7 @@ public:
void SetIndices();
void Sort();
bool Check();
bool CheckSectionRefs();
};