Fix --reconcile by terminating transaction list correctly

when a match is found.
This commit is contained in:
Sebastian Kanthak 2008-11-03 06:09:53 +01:00 committed by John Wiegley
parent 5d41388ff3
commit 7ce1c4e5a9

View file

@ -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;