mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Buglets found by static code inspection, including a whopper in divRound.
This commit is contained in:
@@ -271,7 +271,7 @@ STAmount STAmount::divRound(const STAmount& num, const STAmount& den,
|
||||
--denOffset;
|
||||
}
|
||||
|
||||
bool resultNegative = num.mIsNegative != num.mIsNegative;
|
||||
bool resultNegative = num.mIsNegative != den.mIsNegative;
|
||||
// Compute (numerator * 10^17) / denominator
|
||||
CBigNum v;
|
||||
if ((BN_add_word64(&v, numVal) != 1) || (BN_mul_word64(&v, tenTo17) != 1))
|
||||
|
||||
Reference in New Issue
Block a user