Fix ccCArray

This commit is contained in:
Ed Bartley 2013-05-08 15:22:05 -04:00
parent c4965f8ca5
commit 8b55f1285f
1 changed files with 3 additions and 3 deletions

View File

@ -101,12 +101,12 @@ void ccArrayShrink(ccArray *arr)
unsigned int ccArrayGetIndexOfObject(ccArray *arr, CCObject* object)
{
const unsigned int arrNum = arr->num;
const CCObject* ptr = arr->arr[0];
CCObject** ptr = arr->arr;
for(unsigned int i = 0; i < arrNum; ++i, ++ptr)
{
if( ptr == object ) return i;
if( *ptr == object ) return i;
}
return CC_INVALID_INDEX;
}