fixed bug in write_address

This commit is contained in:
Arvid Norberg 2010-05-24 06:37:32 +00:00
parent 2042593750
commit 2c1ccc7ed6
1 changed files with 5 additions and 3 deletions

View File

@ -60,9 +60,11 @@ namespace libtorrent
}
else if (a.is_v6())
{
address_v6::bytes_type bytes
= a.to_v6().to_bytes();
std::copy(bytes.begin(), bytes.end(), out);
typedef address_v6::bytes_type bytes_t;
bytes_t bytes = a.to_v6().to_bytes();
for (bytes_t::iterator i = bytes.begin()
, end(bytes.end()); i != end; ++i)
write_uint8(*i, out);
}
#endif
}