diff --git a/libi2pd_client/SAM.cpp b/libi2pd_client/SAM.cpp index c662c283..41d08147 100644 --- a/libi2pd_client/SAM.cpp +++ b/libi2pd_client/SAM.cpp @@ -496,10 +496,9 @@ namespace client else m_BufferOffset = 0; - std::shared_ptr
addr; - auto pos = destination.find(".b32.i2p"); - if (pos != std::string::npos) - addr = std::make_shared
(destination.substr (0, pos)); + std::shared_ptr addr; + if (destination.find(".i2p") != std::string::npos) + addr = context.GetAddressBook().GetAddress (destination); else { auto dest = std::make_shared ();