From 7ce1c4e5a980f7653fc11be48c6046fb8b2bff50 Mon Sep 17 00:00:00 2001 From: Sebastian Kanthak Date: Mon, 3 Nov 2008 06:09:53 +0100 Subject: Fix --reconcile by terminating transaction list correctly when a match is found. --- src/reconcile.cc | 6 ++++-- 1 file 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; -- cgit v1.2.3