From 88634973a29693402edd4eb8e943531354c51893 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 19 Jul 2008 23:10:37 -0400 Subject: Some basic fixes to get things almost running, although we still can't parse my personal ledger file yet. --- journal.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'journal.cc') diff --git a/journal.cc b/journal.cc index 184b090b..7ee8526e 100644 --- a/journal.cc +++ b/journal.cc @@ -108,7 +108,7 @@ bool entry_base_t::finalize() if (! ((*x)->flags & TRANSACTION_VIRTUAL) || ((*x)->flags & TRANSACTION_BALANCE)) { amount_t * p = (*x)->cost ? (*x)->cost : &(*x)->amount; - if (*p) { + if (! p->is_null()) { if (no_amounts) { balance = *p; no_amounts = false; @@ -251,7 +251,7 @@ bool entry_base_t::finalize() case value_t::AMOUNT: (*x)->amount = balance.as_amount_lval(); - (*x)->amount.negate(); + (*x)->amount.in_place_negate(); (*x)->flags |= TRANSACTION_CALCULATED; balance += (*x)->amount; -- cgit v1.2.3