issue #2790: Assert fix for Vector<T>::insertObject.

This commit is contained in:
James Chen 2013-12-03 15:32:20 +08:00
parent 1164176bed
commit 2d6e6dbdb0
1 changed files with 1 additions and 1 deletions

View File

@ -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();
}