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

@ -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