Merge branch 'master' of github.com:leethomason/tinyxml2

This commit is contained in:
Lee Thomason (grinliz) 2013-04-20 15:11:42 -07:00
commit 1377fe7ec0
3 changed files with 8 additions and 0 deletions

0
resources/empty.xml Normal file
View File

View File

@ -1608,6 +1608,7 @@ XMLError XMLDocument::LoadFile( FILE* fp )
fseek( fp, 0, SEEK_SET );
if ( size == 0 ) {
SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 );
return _errorID;
}

View File

@ -1158,6 +1158,13 @@ int main( int argc, const char ** argv )
}
{
XMLDocument doc;
XMLError error = doc.LoadFile( "resources/empty.xml" );
XMLTest( "Loading an empty file", XML_ERROR_EMPTY_DOCUMENT, error );
}
// ----------- Performance tracking --------------
{
#if defined( _MSC_VER )