mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Move check of over/underflow after copy. Patch by Mark Tracy
<tracy454@concentric.net>. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25523 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
21735d34f4
commit
038ea67348
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2007-10-10 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSDecimal.m (NSDecimalMultiplyByPowerOf10): Move check of
|
||||
over/underflow after copy. Patch by Mark Tracy <tracy454@concentric.net>.
|
||||
|
||||
2007-10-03 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSData.m: Fix ([-classForCoder:]) to return base class of
|
||||
|
|
|
@ -780,9 +780,10 @@ NSDecimalPower(NSDecimal *result, const NSDecimal *n, unsigned power, NSRounding
|
|||
NSCalculationError
|
||||
NSDecimalMultiplyByPowerOf10(NSDecimal *result, const NSDecimal *n, short power, NSRoundingMode mode)
|
||||
{
|
||||
int p = result->exponent + power;
|
||||
int p;
|
||||
|
||||
NSDecimalCopy(result, n);
|
||||
p = result->exponent + power;
|
||||
if (p > 127)
|
||||
{
|
||||
result->validNumber = NO;
|
||||
|
|
Loading…
Reference in a new issue