fixed hidden array index overflow.
Merge pull request #7370 from Dhilan007/v2

fixed hidden array index overflow in CCImage.cpp.