Skip to content
Permalink
Browse files Browse the repository at this point in the history
Merge pull request #20306 from fuzzard/fix_20305
[Playlist] dont use istream directly to a tinyxml structure
  • Loading branch information
fuzzard committed Oct 20, 2021
2 parents 87ebf05 + 80c8138 commit 48730b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion xbmc/playlists/PlayListPLS.cpp
Expand Up @@ -289,8 +289,9 @@ bool CPlayListASX::LoadData(std::istream& stream)
}
else
{
std::string asxstream(std::istreambuf_iterator<char>(stream), {});
CXBMCTinyXML xmlDoc;
stream >> xmlDoc;
xmlDoc.Parse(asxstream, TIXML_DEFAULT_ENCODING);

if (xmlDoc.Error())
{
Expand All @@ -300,6 +301,9 @@ bool CPlayListASX::LoadData(std::istream& stream)

TiXmlElement *pRootElement = xmlDoc.RootElement();

if (!pRootElement)
return false;

// lowercase every element
TiXmlNode *pNode = pRootElement;
TiXmlNode *pChild = NULL;
Expand Down

0 comments on commit 48730b6

Please sign in to comment.