diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-14 06:25:27 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-14 06:25:27 -0500 |
commit | 20c725df9379347ff53048d91263bd2a06b78833 (patch) | |
tree | 7f1942d463fe4c02fe391e6702e77bc3ee26de2d /src/amount.cc | |
parent | d1faa1e505f947defdd4afe517ff8249fdf79e4d (diff) | |
download | fork-ledger-20c725df9379347ff53048d91263bd2a06b78833.tar.gz fork-ledger-20c725df9379347ff53048d91263bd2a06b78833.tar.bz2 fork-ledger-20c725df9379347ff53048d91263bd2a06b78833.zip |
Made the amount_t::bigint_t refcount holder 32-bits
It was overflowing on a full register report of just 3M of data.
Diffstat (limited to 'src/amount.cc')
-rw-r--r-- | src/amount.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/amount.cc b/src/amount.cc index f8406505..82b93931 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -56,7 +56,7 @@ struct amount_t::bigint_t : public supports_flags<> mpq_t val; precision_t prec; - uint_least16_t refc; + uint_least32_t refc; #define MP(bigint) ((bigint)->val) @@ -80,11 +80,7 @@ struct amount_t::bigint_t : public supports_flags<> bool valid() const { if (prec > 1024) { - DEBUG("ledger.validate", "amount_t::bigint_t: prec > 128"); - return false; - } - if (refc > 16535) { - DEBUG("ledger.validate", "amount_t::bigint_t: refc > 16535"); + DEBUG("ledger.validate", "amount_t::bigint_t: prec > 1024"); return false; } if (flags() & ~(BIGINT_BULK_ALLOC | BIGINT_KEEP_PREC)) { |