CCLabelTTF Bug report

CCLabelTTF Bug report
0.0 0


I found a bug on CCLabelTTF.

When the CCLabelTTF is created with no limit on height as follows,

CCLabelTTF::labelWithString(headword.c_str(), CCSizeMake(aMaxWidth,0), CCTextAlignmentLeft, HW_FONT,HW_SIZE);

Label will crashes on iOS.

The bug was on the
The code around line 380 looks like this.

if (0 >= pInfo->height)
                canvasSize    = textSize;
                pInfo->height = (size_t) textSize.height;

                // This line needs to be added
                pInfo->width = (size_t) textSize.width;

                textRect = CGRectMake(0, 0, textSize.width, textSize.height);

I am not sure there is bug on other platform.
Please reflect this on the later release.



Thank you for your work.
I have tested it and created #546 to resolve it.