gnucash stable: Bug 798899 - Gnucash crashes during CSV import when using a template if the destination account is changed from one used in the template
Geert Janssens
gjanssens at code.gnucash.org
Wed May 3 10:38:13 EDT 2023
Updated via https://github.com/Gnucash/gnucash/commit/84b64233 (commit)
from https://github.com/Gnucash/gnucash/commit/43eb36c3 (commit)
commit 84b64233d7b130ec834c9a61d2a2499ab47d0a03
Author: Geert Janssens <geert at kobaltwit.be>
Date: Wed May 3 16:38:05 2023 +0200
Bug 798899 - Gnucash crashes during CSV import when using a template if the destination account is changed from one used in the template
diff --git a/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp b/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp
index a2a3615124..9589c93381 100644
--- a/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp
+++ b/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp
@@ -411,10 +411,10 @@ void GncPreSplit::UpdateCrossSplitCounters ()
curr = gnc_account_get_currency_or_parent (acct);
auto has_curr = [curr] (const gnc_commodity *vec_curr) { return gnc_commodity_equiv (curr, vec_curr); };
- if (curr && std::none_of (alt_currs.cbegin(), alt_currs.cbegin(), has_curr))
+ if (curr && std::none_of (alt_currs.cbegin(), alt_currs.cend(), has_curr))
m_pre_trans->m_alt_currencies.push_back(curr);
auto has_comm = [comm] (const gnc_commodity *vec_comm) { return gnc_commodity_equiv (comm, vec_comm); };
- if (comm && std::none_of (acct_comms.cbegin(), acct_comms.cbegin(), has_comm))
+ if (comm && std::none_of (acct_comms.cbegin(), acct_comms.cend(), has_comm))
m_pre_trans->m_alt_currencies.push_back(comm);
}
}
Summary of changes:
gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
More information about the gnucash-changes
mailing list