Browse Source

Fixed an issue reading BigInteger ranges beyond the highest set bit

tags/2021-05-28
Tom Poole 7 years ago
parent
commit
4d20d1a406
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      modules/juce_core/maths/juce_BigInteger.cpp

+ 1
- 1
modules/juce_core/maths/juce_BigInteger.cpp View File

@@ -221,7 +221,7 @@ int64 BigInteger::toInt64() const noexcept
BigInteger BigInteger::getBitRange (int startBit, int numBits) const
{
BigInteger r;
numBits = jmin (numBits, getHighestBit() + 1 - startBit);
numBits = jmax (0, jmin (numBits, getHighestBit() + 1 - startBit));
auto* destValues = r.ensureSize (sizeNeededToHold (numBits));
r.highestBit = numBits;


Loading…
Cancel
Save