diff options
author | John Wiegley <johnw@newartisans.com> | 2004-08-15 02:50:07 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-08-15 02:50:07 -0400 |
commit | 78c44b5e795a98baacfbc56943b784370956cbca (patch) | |
tree | eca86147cdfa5f8000b41c0603d7ff9b45219115 | |
parent | b10ff955a370b7fd2add5c5493f1987b5d7b6600 (diff) | |
download | fork-ledger-78c44b5e795a98baacfbc56943b784370956cbca.tar.gz fork-ledger-78c44b5e795a98baacfbc56943b784370956cbca.tar.bz2 fork-ledger-78c44b5e795a98baacfbc56943b784370956cbca.zip |
bug fix
-rw-r--r-- | ledger.cc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -111,7 +111,7 @@ entry_t * journal_t::derive_entry(strings_list::iterator i, - first->amount, - first->amount); added->add_transaction(xact); - if (std::string(*i++) == "-from" && i != end) + if (i != end && std::string(*i++) == "-from" && i != end) if (account_t * acct = find_account(*i)) added->transactions.back()->account = acct; } else { @@ -157,7 +157,7 @@ entry_t * journal_t::derive_entry(strings_list::iterator i, added->add_transaction(xact); } - if (std::string(*i++) == "-from" && i != end) { + if (i != end && std::string(*i++) == "-from" && i != end) { if (account_t * acct = find_account(*i++)) { transaction_t * xact = new transaction_t(NULL, acct); added->add_transaction(xact); |