fixed bug where an asio exception could be thrown when resolving peer countries

This commit is contained in:
Arvid Norberg 2009-04-24 17:29:57 +00:00
parent 4476a44160
commit 9ea68dbb9c
2 changed files with 3 additions and 1 deletions

View File

@ -59,6 +59,8 @@ release 0.14.3
* fixed potential crash on shutdown
* fixed leaking exception from bdecode on malformed input
* fixed bug where connection would hang when receiving a keepalive
* fixed bug where an asio exception could be thrown when resolving
peer countries
release 0.14.2

View File

@ -2889,7 +2889,7 @@ namespace libtorrent
{
unsigned long swap_bytes(unsigned long a)
{
return (a >> 24) | ((a & 0xff0000) >> 8) | ((a & 0xff00) << 8) | (a << 24);
return (a >> 24) | ((a & 0xff0000) >> 8) | ((a & 0xff00) << 8) | ((a & 0xff) << 24);
}
}