fix binary file mode in torrent_info. Fixes #354

This commit is contained in:
Arvid Norberg 2008-06-27 09:41:08 +00:00
parent ff3e80c42f
commit ce99813b48
1 changed files with 1 additions and 1 deletions

View File

@ -286,7 +286,7 @@ namespace libtorrent
// don't load torrent files larger than 2 MB // don't load torrent files larger than 2 MB
if (s > 2000000) return; if (s > 2000000) return;
std::vector<char> buf(s); std::vector<char> buf(s);
std::ifstream f(filename); std::ifstream f(filename, std::ios_base::binary);
f.read(&buf[0], s); f.read(&buf[0], s);
std::string error; std::string error;