mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 19:36:40 +00:00
Fix CSMWorld::InfoCollection::getTopicRange()
returning one too many.
This commit is contained in:
parent
547bc4a252
commit
67cad2c515
1 changed files with 3 additions and 2 deletions
|
@ -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…
Reference in a new issue