1
0
mirror of https://github.com/leethomason/tinyxml2.git synced 2026-07-28 22:52:59 +04:00
This commit is contained in:
Lee Thomason
2014-01-14 12:30:18 -08:00
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -1637,6 +1637,13 @@ XMLError XMLDocument::LoadFile( FILE* fp )
{
Clear();
fseek( fp, 0, SEEK_SET );
fgetc( fp );
if ( ferror( fp ) != 0 ) {
SetError( XML_ERROR_FILE_READ_ERROR, 0, 0 );
return _errorID;
}
fseek( fp, 0, SEEK_END );
size_t size = ftell( fp );
fseek( fp, 0, SEEK_SET );