mirror of https://github.com/axmolengine/axmol.git
issue #2790: Assert fix for Vector<T>::insertObject.
This commit is contained in:
parent
1164176bed
commit
2d6e6dbdb0
|
@ -199,7 +199,7 @@ public:
|
|||
/** Insert a certain object at a certain index */
|
||||
void insertObject(T object, long index)
|
||||
{
|
||||
CCASSERT(index >= 0 && index < count(), "Invalid index!");
|
||||
CCASSERT(index >= 0 && index <= count(), "Invalid index!");
|
||||
_data.insert((std::begin(_data) + index), object);
|
||||
object->retain();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue