logic fig for overflow becoming underflow when using negated values

This commit is contained in:
Richard Frith-Macdonald 2018-02-05 13:26:41 +00:00
parent 29c3dea2b1
commit 8450b94bc8
2 changed files with 3 additions and 2 deletions

View file

@ -4,7 +4,8 @@
Use cast to mask 64bit values.
* Source/NSUnarchiver.m: Remove redundant (always true) conditional.
* Source/NSPropertyList.m: Remove dead code
* Source/NSDecimal.m: Remove dead code
* Source/NSDecimal.m: Remove dead code, tweak underflow settig for
negated numbbers.
* Tools/gdnc.m: Remove dead code
2018-02-04 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -488,7 +488,7 @@ NSDecimalAdd(NSDecimal *result, const NSDecimal *left, const NSDecimal *right,
result->isNegative = YES;
if (NSCalculationUnderflow == error1)
error1 = NSCalculationOverflow;
else if (NSCalculationUnderflow == error1)
else if (NSCalculationOverflow == error1)
error1 = NSCalculationUnderflow;
}
else