From 55509f1a11003837714071d05ea878b340757a76 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Mon, 28 Aug 2017 09:20:50 +0200 Subject: Document assumptions that are being made to avoid division by zero --- src/wallet/wallet.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/wallet') diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 291bcc7a20..6d94154da8 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2741,6 +2741,7 @@ bool CWallet::CreateTransaction(const std::vector& vecSend, CWalletT if (recipient.fSubtractFeeFromAmount) { + assert(nSubtractFeeFromAmount != 0); txout.nValue -= nFeeRet / nSubtractFeeFromAmount; // Subtract fee equally from each selected recipient if (fFirst) // first receiver pays the remainder not divisible by output count -- cgit v1.2.3