From c9959f2008fa7df1d5487f9a0d02f546a3b3a37b Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 23 Nov 2008 23:37:42 -0400 Subject: Added a missing call to _dup() in amount_t::in_place_round. Thanks to unit testing! --- src/amount.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/amount.cc b/src/amount.cc index 37690c76..5958962d 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -606,6 +606,7 @@ amount_t& amount_t::in_place_round(precision_t prec) DEBUG("amount.round", "Rounding " << *this << " to precision " << prec); + _dup(); mpz_round(MPZ(quantity), MPZ(quantity), quantity->prec, prec); quantity->prec = prec; -- cgit v1.2.3