mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 11:23:26 +01:00
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.
This commit is contained in:
parent
da9174c8ee
commit
b5cb8861c7
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user