From c8066aabd82b97d4118849f3bcc3c4096915ad83 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 13 May 2009 16:14:20 +0000 Subject: [PATCH] fixed policy::peer cast bug (introduced when optimizing the peer allocation) --- src/session_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 00bdbbdd8..79c3920f8 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -1181,7 +1181,7 @@ namespace aux { for (policy::iterator j = p.begin_peer() , end(p.end_peer()); j != end; ++j) { - policy::peer* pe = (policy::peer*)&(*j); + policy::peer* pe = *j; if (pe->last_optimistically_unchoked < four_hours) pe->last_optimistically_unchoked = 0;