summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/src/tinyxml2.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mir_core/src/tinyxml2.cpp b/src/mir_core/src/tinyxml2.cpp
index b4ece2f203..919ffa30bd 100644
--- a/src/mir_core/src/tinyxml2.cpp
+++ b/src/mir_core/src/tinyxml2.cpp
@@ -1917,11 +1917,17 @@ char* XMLElement::ParseAttributes( char* p, int* curLineNumPtr )
const int attrLineNum = attrib->_parseLineNum;
p = attrib->ParseDeep( p, _document->ProcessEntities(), curLineNumPtr );
- if ( !p || Attribute( attrib->Name() ) ) {
+ if ( !p ) {
DeleteAttribute( attrib );
_document->SetError( XML_ERROR_PARSING_ATTRIBUTE, attrLineNum, "XMLElement name=%s", Name() );
return 0;
}
+
+ if (Attribute(attrib->Name())) {
+ DeleteAttribute(attrib);
+ continue;
+ }
+
// There is a minor bug here: if the attribute in the source xml
// document is duplicated, it will not be detected and the
// attribute will be doubly added. However, tracking the 'prevAttribute'