summaryrefslogtreecommitdiff
path: root/src/textual.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-01 00:20:23 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-11-01 04:25:23 -0500
commitc5c2027624de16d11e697d6d342e23b0aa5bb23f (patch)
tree41e0ad703a52b5915127f52c4e3b64aef06daca1 /src/textual.cc
parent3497076e048f4aa9c4bea729d9a4070fe4dcfe66 (diff)
downloadfork-ledger-c5c2027624de16d11e697d6d342e23b0aa5bb23f.tar.gz
fork-ledger-c5c2027624de16d11e697d6d342e23b0aa5bb23f.tar.bz2
fork-ledger-c5c2027624de16d11e697d6d342e23b0aa5bb23f.zip
Fix to xact_t::valid()
Diffstat (limited to 'src/textual.cc')
-rw-r--r--src/textual.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/textual.cc b/src/textual.cc
index cbd67352..c2976ee1 100644
--- a/src/textual.cc
+++ b/src/textual.cc
@@ -524,6 +524,7 @@ void instance_t::automated_xact_directive(char * line)
journal.auto_xacts.push_back(ae.get());
+ ae->journal = &journal;
ae->pos = position_t();
ae->pos->pathname = pathname;
ae->pos->beg_pos = pos;
@@ -559,6 +560,7 @@ void instance_t::period_xact_directive(char * line)
if (parse_posts(account_stack.front(), *pe.get())) {
reveal_context = true;
+ pe->journal = &journal;
if (pe->finalize()) {
extend_xact_base(&journal, *pe.get(), true);
@@ -574,6 +576,7 @@ void instance_t::period_xact_directive(char * line)
pe.release();
} else {
+ pe->journal = NULL;
throw parse_error(_("Period transaction failed to balance"));
}
}