Change-Id: I6a073cf728882c74ee0e09606d64f2210a62d0b9
bool Cell::set(int _iIndex, InternalType* _pIT)
{
- if (m_pRealData[_iIndex] == _pIT)
- {
- return true;
- }
-
if (_iIndex < getSize())
{
+ // corner case when inserting twice
+ if (m_pRealData[_iIndex] == _pIT)
+ {
+ return true;
+ }
+
if (m_pRealData[_iIndex] != NULL)
{
m_pRealData[_iIndex]->DecreaseRef();
piEnd = new int[wcslen(pwstInput)];
pwstCapturedString = (wchar_t***)MALLOC(sizeof(wchar_t**) * wcslen(pwstInput));
- piCapturedStringCount = (int*)MALLOC(sizeof(int) * wcslen(pwstInput));
+ piCapturedStringCount = (int*)CALLOC(sizeof(int), wcslen(pwstInput));
do
{