From a4883cfa15cb316441c2537d5425520bce3f86f8 Mon Sep 17 00:00:00 2001 From: orignal Date: Mon, 31 Oct 2016 15:13:43 -0400 Subject: [PATCH] print tunnel peers in direct order --- Tunnel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tunnel.cpp b/Tunnel.cpp index 44d92d75..0c1b278a 100644 --- a/Tunnel.cpp +++ b/Tunnel.cpp @@ -184,10 +184,11 @@ namespace tunnel void Tunnel::PrintHops (std::stringstream& s) const { - for (auto& it: m_Hops) + // hops are in inverted order, we must print in direct order + for (auto it = m_Hops.rbegin (); it != m_Hops.rend (); it++) { s << " ⇒ "; - s << i2p::data::GetIdentHashAbbreviation (it->ident->GetIdentHash ()); + s << i2p::data::GetIdentHashAbbreviation ((*it)->ident->GetIdentHash ()); } }