Skip to content

Commit

Permalink
* {{Bug|5739}} MiniXML (mxml) 3.x compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
geever committed Aug 3, 2019
1 parent 9d705b5 commit 163073a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/common/xml.cpp
Expand Up @@ -509,8 +509,13 @@ static mxml_type_t mxml_ufo_type_cb (xmlNode_t* node)
/* You can lookup attributes and/or use the
* element name, hierarchy, etc... */
const char* type = mxmlElementGetAttr(node, "type");
if (type == nullptr)
if (type == nullptr) {
#ifdef MXML_MAJOR_VERSION
type = mxmlGetElement(node);
#else
type = node->value.element.name;
#endif
}

if (Q_streq(type, "int"))
return MXML_INTEGER;
Expand Down

0 comments on commit 163073a

Please sign in to comment.