[cocos2d] Fix off by one error.