diff --git a/docs/manual.rst b/docs/manual.rst index d3dccfd4f..18bf31bfe 100644 --- a/docs/manual.rst +++ b/docs/manual.rst @@ -7307,7 +7307,7 @@ code to do that:: entry te = ct.generate(); std::vector buffer; bencode(std::back_inserter(buffer), te); - FILE* f = fopen((to_hex(ti->info_hash().to_string()) + ".torrent").c_str(), "w+"); + FILE* f = fopen((to_hex(ti->info_hash().to_string()) + ".torrent").c_str(), "wb+"); if (f) { fwrite(&buffer[0], 1, buffer.size(), f); fclose(f);