Return the correct range for a given topic. Should resolve Bug #2569.

This commit is contained in:
cc9cii 2015-05-26 17:38:22 +10:00
parent 5f41ef4809
commit f06ddd47c4

View file

@ -173,6 +173,17 @@ CSMWorld::InfoCollection::Range CSMWorld::InfoCollection::getTopicRange (const s
RecordConstIterator begin = getRecords().begin()+iter->second; RecordConstIterator begin = getRecords().begin()+iter->second;
while (begin != getRecords().begin())
{
if (!Misc::StringUtils::ciEqual(begin->get().mTopicId, topic2))
{
// we've gone one too far, go back
++begin;
break;
}
--begin;
}
// Find end // Find end
RecordConstIterator end = begin; RecordConstIterator end = begin;