Browse Source

TgaImporter: open the files as binary.

Took me TWO CRAZY HOURS of blaming visual studio, as it stopped reading
in the middle of the file without any reasonable error message ("stream
error", haha).
pull/71/head
Vladimír Vondruš 12 years ago
parent
commit
9f1fe58d66
  1. 2
      src/MagnumPlugins/TgaImporter/TgaImporter.cpp

2
src/MagnumPlugins/TgaImporter/TgaImporter.cpp

@ -62,7 +62,7 @@ void TgaImporter::doOpenData(const Containers::ArrayReference<const unsigned cha
}
void TgaImporter::doOpenFile(const std::string& filename) {
in = new std::ifstream(filename);
in = new std::ifstream(filename, std::ifstream::binary);
if(in->good()) return;
Error() << "Trade::TgaImporter::openFile(): cannot open file" << filename;

Loading…
Cancel
Save