diff options
author | John Wiegley <johnw@newartisans.com> | 2008-11-23 23:37:01 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-11-23 23:37:01 -0400 |
commit | a1717b6dd5465f14f53a1c2ff92a32c31d8635c1 (patch) | |
tree | b7d6019919e6fa4abbf04f73e106de6fd902c7ae /src | |
parent | c172281858a2e2cd9c708e7dbc828b74c16eabc8 (diff) | |
download | ledger-a1717b6dd5465f14f53a1c2ff92a32c31d8635c1.tar.gz ledger-a1717b6dd5465f14f53a1c2ff92a32c31d8635c1.tar.bz2 ledger-a1717b6dd5465f14f53a1c2ff92a32c31d8635c1.zip |
Needed to port skanthak's last commit to the master branch's code base.
Diffstat (limited to 'src')
-rw-r--r-- | src/reconcile.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/reconcile.cc b/src/reconcile.cc index 9b965ac4..2c95023d 100644 --- a/src/reconcile.cc +++ b/src/reconcile.cc @@ -44,11 +44,16 @@ static bool search_for_balance(amount_t& amount, *prev = next; amount -= next->amount; + if (! amount) { - transaction_xdata(*next).ptr = NULL; + *xact_next_ptr(next) = NULL; return true; - } else if (search_for_balance(amount, xact_next_ptr(next), xact_next(next))) + } + else if (search_for_balance(amount, xact_next_ptr(next), xact_next(next))) + { return true; + } + amount += next->amount; *prev = temp; |