aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-03-02 23:27:57 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-03-02 23:27:57 +0000
commit51219457b177986a1dff89334969e0b357ae14fb (patch)
tree76f85514533ce5fd86cf9a2dd94e84b6abc44dbb /src
parentMerge pull request #3245 (diff)
downloadmonero-51219457b177986a1dff89334969e0b357ae14fb.tar.xz
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.
Diffstat (limited to 'src')
-rw-r--r--src/cryptonote_core/cryptonote_tx_utils.cpp2
1 files changed, 2 insertions, 0 deletions
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;
}
//---------------------------------------------------------------