From 51219457b177986a1dff89334969e0b357ae14fb Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 2 Mar 2018 23:27:57 +0000 Subject: [PATCH] core: fix sending to the source address with a short payment id It would fail to send, thinking it needs a destination address, since the destination matches the change address in this case. --- src/cryptonote_core/cryptonote_tx_utils.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cryptonote_core/cryptonote_tx_utils.cpp b/src/cryptonote_core/cryptonote_tx_utils.cpp index 4a10f7133..ebfcbc3d7 100644 --- a/src/cryptonote_core/cryptonote_tx_utils.cpp +++ b/src/cryptonote_core/cryptonote_tx_utils.cpp @@ -189,6 +189,8 @@ namespace cryptonote addr = i.addr; ++count; } + if (count == 0 && change_addr) + return change_addr->m_view_public_key; return addr.m_view_public_key; } //---------------------------------------------------------------