From 7652a75edb6051436c4cf46281c772c4701e8abc Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Tue, 11 Dec 2012 16:02:35 -0800 Subject: [PATCH] Start of fix. --- src/js/amount.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/js/amount.js b/src/js/amount.js index a3e1ef4d5..82307a389 100644 --- a/src/js/amount.js +++ b/src/js/amount.js @@ -758,8 +758,14 @@ Amount.prototype.multiply = function (v) { result._value = this._value.multiply(v._value); } else { + + var v1 = this._value.multiply(consts.bi_10).add(3); + var o1 = this._offset - 1; + var v2 = v._value.multiply(consts.bi_10).add(3); + var o2 = v._offset - 1; + result = new Amount(); - result._offset = o1 + o2; + result._offset = o1 + o2 + 2; result._value = v1.multiply(v2); result._is_negative = this._is_negative !== v._is_negative; result._currency = this._currency.clone();