diff --git a/cocos/2d/platform/ios/CCDevice.mm b/cocos/2d/platform/ios/CCDevice.mm index fa6f51132c..ba6bfd76cf 100644 --- a/cocos/2d/platform/ios/CCDevice.mm +++ b/cocos/2d/platform/ios/CCDevice.mm @@ -482,7 +482,7 @@ Data Device::getTextureDataForText(const char * text,const FontDefinition& textD break; } height = (short)info.height; - widht = (short)info.width; + width = (short)info.width; ret.fastSet(info.data,width * height * 4); } while (0); diff --git a/cocos/2d/platform/mac/CCDevice.mm b/cocos/2d/platform/mac/CCDevice.mm index dc0581b634..4a76b742b3 100644 --- a/cocos/2d/platform/mac/CCDevice.mm +++ b/cocos/2d/platform/mac/CCDevice.mm @@ -224,7 +224,7 @@ Data Device::getTextureDataForText(const char * text,const FontDefinition& textD break; } height = (short)info.height; - widht = (short)info.width; + width = (short)info.width; ret.fastSet(info.data,width * height * 4); } while (0);