From 76ce836fb9b0e80646af42f5574416dc33eccaaa Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sat, 2 May 2009 08:06:37 +0000 Subject: [PATCH] magnet link fix --- src/magnet_uri.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/magnet_uri.cpp b/src/magnet_uri.cpp index a04386e17..78c29557c 100644 --- a/src/magnet_uri.cpp +++ b/src/magnet_uri.cpp @@ -45,7 +45,7 @@ namespace libtorrent char ret[1024]; int num_chars = snprintf(ret, sizeof(ret), "magnet:?xt=urn:btih:%s" - , std::string((char*)handle.info_hash().begin(), 20).c_str()); + , base32encode(std::string((char*)handle.info_hash().begin(), 20)).c_str()); std::string name = handle.name(); @@ -75,7 +75,7 @@ namespace libtorrent { char ret[1024]; int num_chars = snprintf(ret, sizeof(ret), "magnet:?xt=urn:btih:%s" - , std::string((char*)info.info_hash().begin(), 20).c_str()); + , base32encode(std::string((char*)info.info_hash().begin(), 20)).c_str()); std::string const& name = info.name();