fix endless loop when dimensions that are not enough to fit one character
Merge pull request #8580 from Dhilan007/v3-labelfix

issue #8492:fix endless loop when dimensions that are not enough to fit one character
Merge branch 'newcode' into v3
Merge branch 'v3' of https://github.com/super626/cocos2d-x into v3