Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed crash with CCLabelBMFont #1286

Merged
merged 2 commits into from Sep 7, 2012
Merged

Fixed crash with CCLabelBMFont #1286

merged 2 commits into from Sep 7, 2012

Conversation

moadib
Copy link
Contributor

@moadib moadib commented Sep 5, 2012

Fixed crash with CCLabelBMFont when center- or right-aligned text have line breaks each other

You can reproduce crash with

CCLabelBMFont* text = CCLabelBMFont::create("abc\n\n1", "font.fnt");
text->setAlignment(kCCTextAlignmentCenter);
addChild(text);

@minggo
Copy link
Contributor

minggo commented Sep 6, 2012

I have tested the codes you pasted.
It doesn't crash.
You can test it with my branch "CCLabelBMFont_crash".

@moadib
Copy link
Contributor Author

moadib commented Sep 6, 2012

Hmm :)

Try change
CCLabelBMFont* text = CCLabelBMFont::create("abc\n\n1", "font.fnt");
to
CCLabelBMFont* text = CCLabelBMFont::create("abc\n\n123", "font.fnt");

@minggo
Copy link
Contributor

minggo commented Sep 6, 2012

You are right.
Thank you.

@minggo
Copy link
Contributor

minggo commented Sep 6, 2012

How about add some comment of these codes?
And i have created an issue for it http://www.cocos2d-x.org/issues/1464.

lamerman pushed a commit to Game-Insight/cocos2d-x that referenced this pull request Sep 6, 2012
fixed cocos2d#1286: Fixes the declaration of tgaLoadRLEImageData()
minggo added a commit that referenced this pull request Sep 7, 2012
Fixed crash with CCLabelBMFont
@minggo minggo merged commit 255041e into cocos2d:gles20 Sep 7, 2012
angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 28, 2014
fixed cocos2d#1286: Fixes the declaration of tgaLoadRLEImageData()
angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 28, 2014
Fixed crash with CCLabelBMFont
angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 29, 2014
fixed cocos2d#1286: Fixes the declaration of tgaLoadRLEImageData()
angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 29, 2014
Fixed crash with CCLabelBMFont
minggo added a commit that referenced this pull request May 4, 2014
fixed #1286: Fixes the declaration of tgaLoadRLEImageData()
minggo added a commit that referenced this pull request May 4, 2014
Fixed crash with CCLabelBMFont
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants