mirror of https://github.com/AxioDL/tinyxml2.git
clean up some error checking logic
This commit is contained in:
parent
370761b179
commit
82d3200571
|
@ -1702,12 +1702,7 @@ XMLError XMLDocument::Parse( const char* p, size_t len )
|
|||
const char* start = p;
|
||||
Clear();
|
||||
|
||||
if ( len == 0 ) {
|
||||
SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 );
|
||||
return _errorID;
|
||||
}
|
||||
|
||||
if ( !p || !*p ) {
|
||||
if ( len == 0 || !p || !*p ) {
|
||||
SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 );
|
||||
return _errorID;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue