From cd7b928ad5adec798850fd9034a399d97a81f241 Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Wed, 23 Jan 2013 16:08:03 -0800 Subject: [PATCH] Fix error in OfferCreating taking. --- src/cpp/ripple/Amount.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpp/ripple/Amount.cpp b/src/cpp/ripple/Amount.cpp index 862613719..4f091ac79 100644 --- a/src/cpp/ripple/Amount.cpp +++ b/src/cpp/ripple/Amount.cpp @@ -1098,7 +1098,7 @@ bool STAmount::applyOffer( else { // Compute fees in a rounding safe way. - STAmount saTotal = STAmount::multiply(saTakerPaid, STAmount(CURRENCY_ONE, uTakerPaysRate, -9)); + STAmount saTotal = STAmount::multiply(saTakerGot, STAmount(CURRENCY_ONE, uOfferPaysRate, -9)); saOfferIssuerFee = (saTotal > saOfferFunds) ? saOfferFunds-saTakerGot : saTotal - saTakerGot; }