mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-20 15:40:32 +00:00
Fix CSMWorld::InfoCollection::getTopicRange()
returning one too many.
This commit is contained in:
parent
547bc4a252
commit
67cad2c515
@ -2,6 +2,7 @@
|
||||
|
||||
#include <stdexcept>
|
||||
#include <iterator>
|
||||
#include <cassert>
|
||||
|
||||
#include <components/esm/esmreader.hpp>
|
||||
#include <components/esm/loaddial.hpp>
|
||||
@ -256,8 +257,8 @@ CSMWorld::InfoCollection::Range CSMWorld::InfoCollection::getTopicRange (const s
|
||||
|
||||
// Find end (one past the range)
|
||||
RecordConstIterator end = begin + iter->second.size();
|
||||
if (end != getRecords().end())
|
||||
++end;
|
||||
|
||||
assert(static_cast<size_t>(std::distance(begin, end)) == iter->second.size());
|
||||
|
||||
return Range (begin, end);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user