fixed bug in error alert from http_tracker_connection

This commit is contained in:
Arvid Norberg 2008-09-28 07:26:05 +00:00
parent 9a2a10b2eb
commit d2bbe2cc4a
1 changed files with 1 additions and 1 deletions

View File

@ -250,7 +250,7 @@ namespace libtorrent
std::string error_str("invalid bencoding of tracker response: \""); std::string error_str("invalid bencoding of tracker response: \"");
for (char const* i = data, *end(data + size); i != end; ++i) for (char const* i = data, *end(data + size); i != end; ++i)
{ {
if (std::isprint(*i)) error_str += *i; if (*i >= ' ' && *i <= '~') error_str += *i;
else error_str += "0x" + boost::lexical_cast<std::string>((unsigned int)*i) + " "; else error_str += "0x" + boost::lexical_cast<std::string>((unsigned int)*i) + " ";
} }
error_str += "\""; error_str += "\"";