mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 15:11:36 -04:00
Off by one error - can't delete the last element of a refid collection.
This commit is contained in:
parent
6fcf4ea9e3
commit
a6925683c6
@ -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…
x
Reference in New Issue
Block a user