mirror of https://github.com/AxioDL/tinyxml2.git
Merge branch 'master' of https://github.com/leethomason/tinyxml2
This commit is contained in:
commit
44ce7930b7
|
@ -53,6 +53,7 @@ if(BUILD_STATIC_LIBS)
|
||||||
endif(BUILD_STATIC_LIBS)
|
endif(BUILD_STATIC_LIBS)
|
||||||
add_library(tinyxml2 SHARED tinyxml2.cpp tinyxml2.h)
|
add_library(tinyxml2 SHARED tinyxml2.cpp tinyxml2.h)
|
||||||
set_target_properties(tinyxml2 PROPERTIES
|
set_target_properties(tinyxml2 PROPERTIES
|
||||||
|
COMPILE_DEFINITIONS "TINYXML2_EXPORT"
|
||||||
VERSION "${GENERIC_LIB_VERSION}"
|
VERSION "${GENERIC_LIB_VERSION}"
|
||||||
SOVERSION "${GENERIC_LIB_SOVERSION}")
|
SOVERSION "${GENERIC_LIB_SOVERSION}")
|
||||||
|
|
||||||
|
|
|
@ -1637,6 +1637,13 @@ XMLError XMLDocument::LoadFile( FILE* fp )
|
||||||
{
|
{
|
||||||
Clear();
|
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 );
|
fseek( fp, 0, SEEK_END );
|
||||||
size_t size = ftell( fp );
|
size_t size = ftell( fp );
|
||||||
fseek( fp, 0, SEEK_SET );
|
fseek( fp, 0, SEEK_SET );
|
||||||
|
|
Loading…
Reference in New Issue