mirror of
https://github.com/AxioDL/tinyxml2.git
synced 2025-08-11 06:29:17 +00:00
Detect parsing error earlier when looking at end of tag
This commit is contained in:
parent
9f24acd369
commit
ccd267a782
10
tinyxml2.cpp
10
tinyxml2.cpp
@ -1539,15 +1539,15 @@ char* XMLElement::ParseAttributes( char* p )
|
|||||||
prevAttribute = attrib;
|
prevAttribute = attrib;
|
||||||
}
|
}
|
||||||
// end of the tag
|
// end of the tag
|
||||||
else if ( *p == '/' && *(p+1) == '>' ) {
|
|
||||||
_closingType = CLOSED;
|
|
||||||
return p+2; // done; sealed element.
|
|
||||||
}
|
|
||||||
// end of the tag
|
|
||||||
else if ( *p == '>' ) {
|
else if ( *p == '>' ) {
|
||||||
++p;
|
++p;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// end of the tag
|
||||||
|
else if ( *p == '/' && *(p+1) == '>' ) {
|
||||||
|
_closingType = CLOSED;
|
||||||
|
return p+2; // done; sealed element.
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
_document->SetError( XML_ERROR_PARSING_ELEMENT, start, p );
|
_document->SetError( XML_ERROR_PARSING_ELEMENT, start, p );
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user