So when file's length is 0 you do not set the error (error id is 0) and it does not seem correct to me.
IMO the correct way will be to set an error to TIXML_ERROR_DOCUMENT_EMPTY like you do when a document contains a few empty spaces.
What do you think?
Thanks,
Igor.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I've noticed that in the TiXmlDocument::LoadFile() function there is the following code:
if ( length == 0 )
{
fclose( file );
return false;
}
So when file's length is 0 you do not set the error (error id is 0) and it does not seem correct to me.
IMO the correct way will be to set an error to TIXML_ERROR_DOCUMENT_EMPTY like you do when a document contains a few empty spaces.
What do you think?
Thanks,
Igor.
Igor --
I think you are correct - it should be consistent. I entered a bug.
lee