From 0155c1ed41edd8ee44289f53477abdeef6fc83e6 Mon Sep 17 00:00:00 2001 From: VisualSJ Date: Thu, 30 Oct 2014 14:50:15 +0800 Subject: [PATCH] Repair labelTTF circulation problems --- cocos2d/core/labelttf/CCLabelTTF.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cocos2d/core/labelttf/CCLabelTTF.js b/cocos2d/core/labelttf/CCLabelTTF.js index 0fa34cc039..3591ed2fa5 100644 --- a/cocos2d/core/labelttf/CCLabelTTF.js +++ b/cocos2d/core/labelttf/CCLabelTTF.js @@ -844,6 +844,10 @@ cc.LabelTTF = cc.Sprite.extend(/** @lends cc.LabelTTF# */{ } fuzzyLen -= pushNum; + if(fuzzyLen === 0){ + fuzzyLen = 1; + sLine = sLine.substr(1); + } var sText = text.substr(0, fuzzyLen);