diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-02-02 20:53:12 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-02-02 20:53:12 +0000 |
commit | b5cb8861c731cd80176eb6e8e1dcaa36ec51b61e (patch) | |
tree | 31211b8fa1a7d5107e333b8b9a31946806b88b3c /src | |
parent | Merge pull request #1656 (diff) | |
download | monero-b5cb8861c731cd80176eb6e8e1dcaa36ec51b61e.tar.xz |
core: fix integrated addresses breaking with auto zero change
Zero change is sent to a random address, which confuses the code
which determines which key to use to encrypt the payment id.
Ignore zero amounts for this purpose, so the payment id gets
encrypted with the real destination's key.
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptonote_core/cryptonote_format_utils.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cryptonote_core/cryptonote_format_utils.cpp b/src/cryptonote_core/cryptonote_format_utils.cpp index 70ba7ee18..2e6917878 100644 --- a/src/cryptonote_core/cryptonote_format_utils.cpp +++ b/src/cryptonote_core/cryptonote_format_utils.cpp @@ -443,6 +443,8 @@ namespace cryptonote { if (!memcmp(&destinations[n].addr, &sender_keys.m_account_address, sizeof(destinations[0].addr))) continue; + if (destinations[n].amount == 0) + continue; if (memcmp(&destinations[n].addr, &destinations[0].addr, sizeof(destinations[0].addr))) return null_pkey; } |