fixed missing case in save_struct

This commit is contained in:
Arvid Norberg 2013-12-09 08:00:21 +00:00
parent e67312e683
commit 396e5bbb37
2 changed files with 2 additions and 1 deletions

View File

@ -2903,7 +2903,7 @@ retry:
// someone else is holding a reference, it's important that
// it's destructed from the network thread. Make sure the
// last reference is held by the network thread.
if (!p->refcount() == 1)
if (p->refcount() != 1)
m_undead_peers.push_back((peer_connection*)p);
// too expensive

View File

@ -129,6 +129,7 @@ namespace libtorrent
case std_string: val = *((std::string*)src); break;
case character: val = *((char*)src); break;
case integer: val = *((int*)src); break;
case integer16: val = *((boost::uint16_t*)src); break;
case size_integer: val = *((size_type*)src); break;
case time_integer: val = *((time_t*)src); break;
case floating_point: val = size_type(*((float*)src) * 1000.f); break;