diff options
author | John Wiegley <johnw@newartisans.com> | 2005-07-22 23:02:25 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:41:16 -0400 |
commit | b98901664cfa7a54b2fd4c4a707eac8d17faaaa1 (patch) | |
tree | 2267fd84d429825de8f1cab5736b87f1a8de00d8 | |
parent | 5fb495858bd2fc3332def31a07e3c6d72e2d001e (diff) | |
download | fork-ledger-b98901664cfa7a54b2fd4c4a707eac8d17faaaa1.tar.gz fork-ledger-b98901664cfa7a54b2fd4c4a707eac8d17faaaa1.tar.bz2 fork-ledger-b98901664cfa7a54b2fd4c4a707eac8d17faaaa1.zip |
(read_binary_journal, write_binary_journal): The "basket" account
pointer was being incorrectly restored from the cache.
-rw-r--r-- | binary.cc | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -11,7 +11,7 @@ namespace ledger { static unsigned long binary_magic_number = 0xFFEED765; -static unsigned long format_version = 0x00020037; +static unsigned long format_version = 0x00020039; static account_t ** accounts; static account_t ** accounts_next; @@ -390,7 +390,7 @@ unsigned int read_binary_journal(std::istream& in, accounts = accounts_next = new account_t *[a_count]; journal->master = read_binary_account(data, journal, master); if (read_binary_number<bool>(data)) - journal->basket = read_binary_account(data, journal); + journal->basket = accounts[read_binary_number<account_t::ident_t>(data) - 1]; // Allocate the memory needed for the entries and transactions in // one large block, which is then chopped up and custom constructed @@ -698,7 +698,7 @@ void write_binary_journal(std::ostream& out, journal_t * journal) if (journal->basket) { write_binary_number<bool>(out, true); - write_binary_account(out, journal->basket); + write_binary_number(out, journal->basket->ident); } else { write_binary_number<bool>(out, false); } |