diff --git a/cocos/2d/CCLabel.cpp b/cocos/2d/CCLabel.cpp index f343284854..b501d4ff0a 100644 --- a/cocos/2d/CCLabel.cpp +++ b/cocos/2d/CCLabel.cpp @@ -2391,7 +2391,7 @@ FontDefinition Label::_getFontDefinition() const systemFontDef._fontSize = _systemFontSize; systemFontDef._alignment = _hAlignment; systemFontDef._vertAlignment = _vAlignment; - systemFontDef._dimensions.width = _labelWidth; + systemFontDef._dimensions.width = _labelWidth == 0.f ? _maxLineWidth : _labelWidth; systemFontDef._dimensions.height = _labelHeight; systemFontDef._fontFillColor.r = _textColor.r; systemFontDef._fontFillColor.g = _textColor.g;