From 7a7e5dc52537a534bd92dfb17fd0d0d8f39c2723 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Thu, 1 Jan 2015 17:58:35 +0300 Subject: [PATCH] Rearrange checks in more natural order --- tinyxml2.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 42659f2..4bb4d1f 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -924,11 +924,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;