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.
This commit is contained in:
moneromooo-monero 2018-03-02 23:27:57 +00:00
parent 421ab3119c
commit 51219457b1
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -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;
}
//---------------------------------------------------------------