diff --git a/CHANGELOG b/CHANGELOG index ce27724..52c68ed 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,14 +1,15 @@ Version 0.8.6 prerelease (2009.10.07): - * fixed: UInt::SetBitInWord(uint & value, uint bit) set 1 if the bit was - equal 1 (should be set 2) - this affected only no-asm parts - when macro TTMATH_NOASM was defined - * fixed: UInt::MulInt(uint ss2) - there was a buffer overflow when value_size was equal 1 - * fixed: UInt::AddVector() and UInt::SubVector() didn't want to compile + * fixed: UInt::SetBitInWord(uint & value, uint bit) set 1 if the bit was + equal 1 (should be set 2) + this affected only no-asm parts - when macro TTMATH_NOASM was defined + * fixed: UInt::MulInt(uint ss2) + there was a buffer overflow when value_size was equal 1 + * fixed: UInt::AddVector() and UInt::SubVector() didn't want to compile when macro TTMATH_NOASM was defined * fixed: Big::operator>> didn't correctly recognize values in scientific mode (with 'e' character) * fixed: Int::FromString(const tt_string & s, uint b = 10) didn't use 'b' (always was '10') + * fixed: buffer overflow in Big::ToInt(Int & result) Version 0.8.5 (2009.06.16): diff --git a/ttmath/ttmathbig.h b/ttmath/ttmathbig.h index fc0760c..0a535b6 100644 --- a/ttmath/ttmathbig.h +++ b/ttmath/ttmathbig.h @@ -1887,6 +1887,7 @@ public: if( exponent > maxbit + sint(int_size*TTMATH_BITS_PER_UINT) ) // if exponent > (maxbit + sint(int_size*TTMATH_BITS_PER_UINT)) the value can't be passed // into the 'Int' type (it's too big) + return 1; if( exponent <= maxbit ) // our value is from range (-1,1) and we return zero