We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
Cocos2dxBitmap.java : divideStringWithMaxWidth method index out of range
Cocos2dxBitmap.java : divideStringWithMaxWidth method index out of range
Bug #2761 [Closed]
- Status changed from New to Closed
- Assignee changed from walzer@cocos2d-x.org to zhangxm
- % Done changed from 0 to 100
file:Cocos2dxBitmap.java
line:277
/* Break a String into String[] by the width & should wrap the word. */
for (int i = 1; i <= charLength; ++i) {
>should change to:
for (int i = 1; i < charLength; ++i) {
we call CCLabelTTF::setString method will crash, when the CCLabelTTF control’s
width and it’s content meet some conditions.