diff options
author | fuzzard <fuzzard@users.noreply.github.com> | 2022-12-10 10:42:09 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-10 10:42:09 +1000 |
commit | 62c9b7ca803812cd1e4882fe99bbc42d8d35af3d (patch) | |
tree | 279962178852ec5ea670516c8b1ff70ebfe5a438 | |
parent | 7cc3d3cb9555848c59a325e6113b3de5ddb209ea (diff) | |
parent | 91a2a0e2f7b84dafb5ff3f763e136183f2a69e5a (diff) |
Merge pull request #22234 from joseluismarti/param-and-comment
[GUI] PARAM in includes are not evaluated when comments exist
-rw-r--r-- | xbmc/guilib/GUIIncludes.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xbmc/guilib/GUIIncludes.cpp b/xbmc/guilib/GUIIncludes.cpp index ee17330004..c389122d89 100644 --- a/xbmc/guilib/GUIIncludes.cpp +++ b/xbmc/guilib/GUIIncludes.cpp @@ -618,12 +618,16 @@ void CGUIIncludes::ResolveParametersForNode(TiXmlElement *node, const Params& pa else if (result != NO_PARAMS_FOUND) child->SetValue(newValue); } - else if (child->Type() == TiXmlNode::TINYXML_ELEMENT) + else if (child->Type() == TiXmlNode::TINYXML_ELEMENT || + child->Type() == TiXmlNode::TINYXML_COMMENT) { do { - TiXmlElement *next = child->NextSiblingElement(); // save next as current child might be removed from the tree - ResolveParametersForNode(static_cast<TiXmlElement *>(child), params); + if (child->Type() == TiXmlNode::TINYXML_ELEMENT) + ResolveParametersForNode(static_cast<TiXmlElement*>(child), params); + + // save next as current child might be removed from the tree + TiXmlElement* next = child->NextSiblingElement(); child = next; } while (child); |