diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 76262a9..5633397 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -927,11 +927,10 @@ char* XMLText::ParseDeep( char* p, StrPair* ) } p = _value.ParseText( p, "<", flags ); - if ( !p ) { - _document->SetError( XML_ERROR_PARSING_TEXT, start, 0 ); - } if ( p && *p ) { return p-1; + } else if ( !p ) { + _document->SetError( XML_ERROR_PARSING_TEXT, start, 0 ); } } return 0;