From ccd267a782043c3d487a96919135b3f94175addd Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Fri, 10 Apr 2015 15:42:54 +0300 Subject: [PATCH] Detect parsing error earlier when looking at end of tag --- tinyxml2.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tinyxml2.cpp b/tinyxml2.cpp index a536abf..32eccfe 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -1539,15 +1539,15 @@ char* XMLElement::ParseAttributes( char* p ) prevAttribute = attrib; } // end of the tag - else if ( *p == '/' && *(p+1) == '>' ) { - _closingType = CLOSED; - return p+2; // done; sealed element. - } - // end of the tag else if ( *p == '>' ) { ++p; break; } + // end of the tag + else if ( *p == '/' && *(p+1) == '>' ) { + _closingType = CLOSED; + return p+2; // done; sealed element. + } else { _document->SetError( XML_ERROR_PARSING_ELEMENT, start, p ); return 0;