mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +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
409b3830fa
commit
869702f8a7
2 changed files with 7 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue