From: Markus Koschany Date: Mon, 17 Feb 2020 22:49:06 +0100 Subject: bug 949301 mxml Bug-Debian: https://bugs.debian.org/949301 Origin: https://sourceforge.net/p/ufoai/code/ci/163073ab9527cdaa33d77a713b8e46ff462a2b5c/ --- src/common/xml.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/common/xml.cpp b/src/common/xml.cpp index 1629c90..8323752 100644 --- a/src/common/xml.cpp +++ b/src/common/xml.cpp @@ -519,8 +519,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 (!strcmp(type, "int")) return MXML_INTEGER;