diff options
author | Sebastian Kanthak <skanthak@gmail.com> | 2008-11-03 06:09:53 +0100 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-11-23 19:08:38 -0400 |
commit | 7ce1c4e5a980f7653fc11be48c6046fb8b2bff50 (patch) | |
tree | 2c3f3dc9d0e1fae537abbc6921d066d44e899fb0 | |
parent | 5d41388ff3e971d47f8fb7938be49f3dca85c3d1 (diff) | |
download | fork-ledger-7ce1c4e5a980f7653fc11be48c6046fb8b2bff50.tar.gz fork-ledger-7ce1c4e5a980f7653fc11be48c6046fb8b2bff50.tar.bz2 fork-ledger-7ce1c4e5a980f7653fc11be48c6046fb8b2bff50.zip |
Fix --reconcile by terminating transaction list correctly
when a match is found.
-rw-r--r-- | src/reconcile.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/reconcile.cc b/src/reconcile.cc index 0294d93e..9b965ac4 100644 --- a/src/reconcile.cc +++ b/src/reconcile.cc @@ -44,8 +44,10 @@ static bool search_for_balance(amount_t& amount, *prev = next; amount -= next->amount; - if (! amount || - search_for_balance(amount, xact_next_ptr(next), xact_next(next))) + if (! amount) { + transaction_xdata(*next).ptr = NULL; + return true; + } else if (search_for_balance(amount, xact_next_ptr(next), xact_next(next))) return true; amount += next->amount; |