2009-11-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Use hton64
	* src/base32.cc
pull/1/head
Tatsuhiro Tsujikawa 2009-11-24 13:08:51 +00:00
parent 894165171c
commit d2cefd8613
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2009-11-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use hton64
* src/base32.cc
2009-11-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added Base32 encoded BitTorrent Magnet Link support.

View File

@ -122,7 +122,7 @@ std::string decode(const std::string& src)
}
buf >>= (bits%8);
bits = bits/8*8;
buf = ntoh64(buf);
buf = hton64(buf);
char* p = reinterpret_cast<char*>(&buf);
ret += std::string(&p[(64-bits)/8], &p[8]);
}