Hi guys,
I’ve found problems using the CCBReader when deploying my game to an iPhone 4. There are several potential lines in CCBReader where the game will crash due to memory misalignment.
in CCBReader::readHeader()
int magicBytes = *((int*)(this->mBytes + this->mCurrentByte));
should be
int magicBytes; unsigned char* pData = ( this->mBytes + this->mCurrentByte ); memcpy( &magicBytes, pData, sizeof( int ) );
in CCBReader::readFloat() there is something really dangerous
float * pF =…