Skip to content

Commit d69c49d

Browse files
fixed cocos2d#1350:fixed string bug
1 parent aa8ded9 commit d69c49d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cocos2d/label_nodes/CCLabelTTF.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ cc.LabelTTF = cc.Sprite.extend(/** @lends cc.LabelTTF# */{
171171
* @return {Boolean} return false on error
172172
*/
173173
initWithString:function (arg) {
174-
var strInfo = arg[0], fontName, fontSize, dimensions, hAlignment, vAlignment;
174+
var strInfo = new String(arg[0]), fontName, fontSize, dimensions, hAlignment, vAlignment;
175175
cc.Assert(strInfo != null, "cc.LabelTTF.initWithString() label is null");
176176
if (arg.length == 6) {
177177
fontName = arg[1];

0 commit comments

Comments
 (0)