mirror of
https://github.com/monero-project/monero.git
synced 2025-08-20 03:18:16 -04:00
add empty container sanity checks when using front() and back()
This commit is contained in:
parent
56fa6ce15f
commit
45a1c4c088
9 changed files with 32 additions and 6 deletions
|
@ -4321,9 +4321,9 @@ bool simple_wallet::sweep_single(const std::vector<std::string> &args_)
|
|||
fail_msg_writer() << tr("Multiple transactions are created, which is not supposed to happen");
|
||||
return true;
|
||||
}
|
||||
if (ptx_vector[0].selected_transfers.size() > 1)
|
||||
if (ptx_vector[0].selected_transfers.size() != 1)
|
||||
{
|
||||
fail_msg_writer() << tr("The transaction uses multiple inputs, which is not supposed to happen");
|
||||
fail_msg_writer() << tr("The transaction uses multiple or no inputs, which is not supposed to happen");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue