Merge pull request #342 from Dmitry-Me/testErrorNames

Test error name is non-empty for the whole range
This commit is contained in:
Lee Thomason
2015-05-26 11:09:12 -07:00
2 changed files with 11 additions and 1 deletions

View File

@@ -1963,7 +1963,9 @@ void XMLDocument::SetError( XMLError error, const char* str1, const char* str2 )
const char* XMLDocument::ErrorName() const
{
TIXMLASSERT( _errorID >= 0 && _errorID < XML_ERROR_COUNT );
return _errorNames[_errorID];
const char* errorName = _errorNames[_errorID];
TIXMLASSERT( errorName && errorName[0] );
return errorName;
}
void XMLDocument::PrintError() const