Send: fix multidest parse line numbers

This commit is contained in:
tobtoht 2021-10-22 23:35:20 +02:00
parent 2e7b23898c
commit ab32e0b2a3
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C

View file

@ -170,8 +170,9 @@ void PayToEdit::parseAsMultiline(const QStringList &lines) {
m_outputs.clear();
m_total = 0;
int i = 0;
int i = -1;
for (auto &line : lines) {
i++;
PartialTxOutput output = this->parseAddressAndAmount(line);
if (output.address.isEmpty() && output.amount == 0) {
m_errors.append(PayToLineError(line, "Expected two comma-separated values: (address, amount)", i, true));
@ -186,6 +187,5 @@ void PayToEdit::parseAsMultiline(const QStringList &lines) {
m_outputs.append(output);
m_total += output.amount;
i += 1;
}
}