Projects > cpp > Issues > Bug #2761

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

Cocos2dxBitmap.java : divideStringWithMaxWidth method index out of range

Bug #2761 [Closed]
linguohua 2013-09-02 07:25 . Updated about 3 years ago

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.

zhangxm 2013-09-26 14:58
  • Status changed from New to Closed
  • Assignee changed from walzer@cocos2d-x.org to zhangxm
  • % Done changed from 0 to 100

Atom PDF

Status:Closed
Start date:2013-09-02
Priority:High
Due date:
Assignee:zhangxm
% Done:

100%

Category:all, android
Target version:2.2

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.