From ce99813b48865699dcef712f524e86d177e06e95 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 27 Jun 2008 09:41:08 +0000 Subject: [PATCH] fix binary file mode in torrent_info. Fixes #354 --- src/torrent_info.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/torrent_info.cpp b/src/torrent_info.cpp index 8afd2e408..894b92a99 100644 --- a/src/torrent_info.cpp +++ b/src/torrent_info.cpp @@ -286,7 +286,7 @@ namespace libtorrent // don't load torrent files larger than 2 MB if (s > 2000000) return; std::vector buf(s); - std::ifstream f(filename); + std::ifstream f(filename, std::ios_base::binary); f.read(&buf[0], s); std::string error;