add empty container sanity checks when using front() and back()

This commit is contained in:
moneromooo-monero 2017-12-11 22:36:58 +00:00
parent 56fa6ce15f
commit 45a1c4c088
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
9 changed files with 32 additions and 6 deletions

View file

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