Skip to content

Commit 124f95b

Browse files
committed
Write .torrent file in binary mode.
1 parent 8a8a4de commit 124f95b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

mag2tor.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ int main(int argc, char *argv[]) {
6262
std::ofstream ofs;
6363
ofs.exceptions(std::ofstream::failbit
6464
| std::ofstream::badbit);
65-
ofs.open(tinf.name() + ".torrent");
65+
ofs.open(tinf.name() + ".torrent",
66+
std::ofstream::binary);
6667
std::ostream_iterator<char> ofsi(ofs);
6768
lt::bencode(ofsi, lt::create_torrent(tinf)
6869
.generate());

0 commit comments

Comments
 (0)