forked from mirror/openmw-tes3mp
Off by one error - can't delete the last element of a refid collection.
This commit is contained in:
parent
6fcf4ea9e3
commit
a6925683c6
1 changed files with 1 additions and 1 deletions
|
@ -130,7 +130,7 @@ namespace CSMWorld
|
||||||
template<typename RecordT>
|
template<typename RecordT>
|
||||||
void RefIdDataContainer<RecordT>::erase (int index, int count)
|
void RefIdDataContainer<RecordT>::erase (int index, int count)
|
||||||
{
|
{
|
||||||
if (index<0 || index+count>=getSize())
|
if (index<0 || index+count>getSize())
|
||||||
throw std::runtime_error ("invalid RefIdDataContainer index");
|
throw std::runtime_error ("invalid RefIdDataContainer index");
|
||||||
|
|
||||||
mContainer.erase (mContainer.begin()+index, mContainer.begin()+index+count);
|
mContainer.erase (mContainer.begin()+index, mContainer.begin()+index+count);
|
||||||
|
|
Loading…
Reference in a new issue