diff options
Diffstat (limited to 'src/lookup.cc')
-rw-r--r-- | src/lookup.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lookup.cc b/src/lookup.cc index 221397ca..28007d9a 100644 --- a/src/lookup.cc +++ b/src/lookup.cc @@ -60,9 +60,10 @@ namespace { } std::pair<xact_t *, account_t *> -lookup_probable_account(const string& ident, - xacts_iterator& iter_func, - account_t * ref_account) +lookup_probable_account(const string& ident, + xacts_list::reverse_iterator iter, + xacts_list::reverse_iterator end, + account_t * ref_account) { scorecard_t scores; @@ -83,7 +84,8 @@ lookup_probable_account(const string& ident, " with reference account: " << ref_account->fullname()); #endif - while (xact_t * xact = iter_func()) { + xact_t * xact; + while (iter != end && (xact = *iter++) != NULL) { #if 0 // Only consider transactions from the last two years (jww (2010-03-07): // make this an option) |