fixed bug in make_magnet_uri

This commit is contained in:
Arvid Norberg 2007-12-09 04:45:55 +00:00
parent 8c3f9571de
commit c50d08f75f
1 changed files with 2 additions and 1 deletions

View File

@ -47,7 +47,8 @@ namespace libtorrent
std::string name = handle.name();
ret << "magnet:?xt=urn:btih:" << base32encode((char*)handle.info_hash().begin());
ret << "magnet:?xt=urn:btih:" << base32encode(
std::string((char*)handle.info_hash().begin(), 20));
if (!name.empty())
ret << "&dn=" << escape_string(name.c_str(), name.length());
torrent_status st = handle.status();