Skip to content

Commit

Permalink
Tweka for overflow of negative number calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
rfm committed Feb 7, 2018
1 parent c515993 commit d95203c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ChangeLog
Expand Up @@ -7,6 +7,7 @@
* Source/NSNumberFormatter.m: remove dead code
* Source/NSPropertyList.m: avoid warnings using cast to void
* Source/NSMessagePortNameServer.m: added security checks
* Source/NSDecimal.m: tweak underflow setting for negative numbers
* Tools/AGSHtml.m: remove useless test

2018-02-07 Yavor Doganov <yavor@gnu.org>
Expand Down Expand Up @@ -37,7 +38,7 @@
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, tweak underflow settig for
* Source/NSDecimal.m: Remove dead code, tweak underflow setting for
negated numbbers.
* Tools/gdnc.m: Remove dead code

Expand Down
2 changes: 1 addition & 1 deletion Source/NSDecimal.m
Expand Up @@ -554,7 +554,7 @@ but small numbers can only be represented with limited exactness (one digit
result->isNegative = YES;
if (NSCalculationUnderflow == error1)
error1 = NSCalculationOverflow;
else if (NSCalculationUnderflow == error1)
else if (NSCalculationOverflow == error1)
error1 = NSCalculationUnderflow;
return error1;
}
Expand Down

0 comments on commit d95203c

Please sign in to comment.