diff --git a/cocos/2d/CCUserDefault.cpp b/cocos/2d/CCUserDefault.cpp index ab30c805a0..5a85d65b41 100644 --- a/cocos/2d/CCUserDefault.cpp +++ b/cocos/2d/CCUserDefault.cpp @@ -66,7 +66,7 @@ static tinyxml2::XMLElement* getXMLNodeForKey(const char* pKey, tinyxml2::XMLEle CCLOG("can not read xml file"); break; } - xmlDoc->Parse(pXmlBuffer); + xmlDoc->Parse(pXmlBuffer, nSize); delete[] pXmlBuffer; // get root node *rootNode = xmlDoc->RootElement();