Menu

Bug (and fix)

Jimb Esser
2002-07-17
2003-04-06
  • Jimb Esser

    Jimb Esser - 2002-07-17

    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).

     
    • Lee Thomason

      Lee Thomason - 2002-07-18

      Good catch. I'll put that in the next version.

       
    • Yves Berquin

      Yves Berquin - 2003-04-06

      Thanks for the fix. It's in 2.1.5 (to come)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.