mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-11 20:34:47 +00:00
Changed: #1051 ForceRemovePatchCategories is using a bad index
This commit is contained in:
parent
b589d48e4b
commit
318a083a24
1 changed files with 10 additions and 4 deletions
|
@ -1132,14 +1132,20 @@ void CPatchManager::readDescFile(sint32 nVersion)
|
|||
}
|
||||
}
|
||||
|
||||
CBNPFileSet &bnpFS = const_cast<CBNPFileSet &>(DescFile.getFiles());
|
||||
|
||||
for(cat = 0; cat < DescFile.getCategories().categoryCount();)
|
||||
{
|
||||
const CBNPCategory &bnpCat = DescFile.getCategories().getCategory(cat);
|
||||
|
||||
if (std::find(ForceRemovePatchCategories.begin(), ForceRemovePatchCategories.end(),
|
||||
DescFile.getCategories().getCategory(cat).getName()) != ForceRemovePatchCategories.end())
|
||||
bnpCat.getName()) != ForceRemovePatchCategories.end())
|
||||
{
|
||||
std::string fileName = DescFile.getCategories().getFile(cat);
|
||||
CBNPFileSet &bnpFS = const_cast<CBNPFileSet &>(DescFile.getFiles());
|
||||
for(uint file = 0; file < bnpCat.fileCount(); ++file)
|
||||
{
|
||||
std::string fileName = bnpCat.getFile(file);
|
||||
bnpFS.removeFile(fileName);
|
||||
}
|
||||
const_cast<CBNPCategorySet &>(DescFile.getCategories()).deleteCategory(cat);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue