Just started using tinyxml, and found a small bug. When loading a file, if it gets an error parsing, it ends up reporting that it could not open the file, instead of the error that the parser reports. The problem is on line 713 in tinyxml.cpp on my copy, the very end of TiXmlDocument::LoadFile. Changing this:
}
SetError( TIXML_ERROR_OPENING_FILE );
to:
} else {
SetError( TIXML_ERROR_OPENING_FILE );
}
Fixes it (since Parse( data.c_str() ); above calls SetError with the actual error).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just started using tinyxml, and found a small bug. When loading a file, if it gets an error parsing, it ends up reporting that it could not open the file, instead of the error that the parser reports. The problem is on line 713 in tinyxml.cpp on my copy, the very end of TiXmlDocument::LoadFile. Changing this:
}
SetError( TIXML_ERROR_OPENING_FILE );
to:
} else {
SetError( TIXML_ERROR_OPENING_FILE );
}
Fixes it (since Parse( data.c_str() ); above calls SetError with the actual error).
Good catch. I'll put that in the next version.
Thanks for the fix. It's in 2.1.5 (to come)