From 9bcd9c7674ba76151b17760e6096b0158a1331a5 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Tue, 9 Dec 2014 10:58:14 +0300 Subject: [PATCH] Should not check errorID with implicit conversion --- tinyxml2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tinyxml2.cpp b/tinyxml2.cpp index fc746de..1f43faa 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -1835,7 +1835,7 @@ XMLError XMLDocument::Parse( const char* p, size_t len ) ptrdiff_t delta = p - start; // skip initial whitespace, BOM, etc. ParseDeep( _charBuffer+delta, 0 ); - if (_errorID) { + if ( Error() ) { // clean up now essentially dangling memory. // and the parse fail can put objects in the // pools that are dead and inaccessible. @@ -1875,7 +1875,7 @@ const char* XMLDocument::ErrorName() const void XMLDocument::PrintError() const { - if ( _errorID ) { + if ( Error() ) { static const int LEN = 20; char buf1[LEN] = { 0 }; char buf2[LEN] = { 0 };