~cypheon/elfelli

152b9b5be3b04bf2f742282a3b3077046d463ad4 — Johann Rudloff 14 years ago 4cf3087
Close the file after reading.
1 files changed, 1 insertions(+), 1 deletions(-)

M src/XmlLoader.cpp
M src/XmlLoader.cpp => src/XmlLoader.cpp +1 -1
@@ 70,8 70,8 @@ int XmlLoader::load(const char *filename, Simulation *target)
  std::ifstream in(filename);
  if(!in)
    return 1;

  in.read(reinterpret_cast<char *>(buf), MAX_FILE_SIZE);
  in.close();

  XML_SetStartElementHandler(parser, XmlLoader::start_element);
  XML_ParseBuffer(parser, std::strlen(reinterpret_cast<char *>(buf)), 1);