Made the amount_t::bigint_t refcount holder 32-bits
It was overflowing on a full register report of just 3M of data.
This commit is contained in:
parent
d1faa1e505
commit
20c725df93
1 changed files with 2 additions and 6 deletions
|
|
@ -56,7 +56,7 @@ struct amount_t::bigint_t : public supports_flags<>
|
||||||
|
|
||||||
mpq_t val;
|
mpq_t val;
|
||||||
precision_t prec;
|
precision_t prec;
|
||||||
uint_least16_t refc;
|
uint_least32_t refc;
|
||||||
|
|
||||||
#define MP(bigint) ((bigint)->val)
|
#define MP(bigint) ((bigint)->val)
|
||||||
|
|
||||||
|
|
@ -80,11 +80,7 @@ struct amount_t::bigint_t : public supports_flags<>
|
||||||
|
|
||||||
bool valid() const {
|
bool valid() const {
|
||||||
if (prec > 1024) {
|
if (prec > 1024) {
|
||||||
DEBUG("ledger.validate", "amount_t::bigint_t: prec > 128");
|
DEBUG("ledger.validate", "amount_t::bigint_t: prec > 1024");
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (refc > 16535) {
|
|
||||||
DEBUG("ledger.validate", "amount_t::bigint_t: refc > 16535");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (flags() & ~(BIGINT_BULK_ALLOC | BIGINT_KEEP_PREC)) {
|
if (flags() & ~(BIGINT_BULK_ALLOC | BIGINT_KEEP_PREC)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue