Skip to content

Commit d1104c7

Browse files
committed
Revert bad decimal change and fix incorrect use of BOOL
1 parent 66a5912 commit d1104c7

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Source/NSDecimal.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,7 +1569,7 @@ static void DecimalToCharvec(const NSDecimal *n, GSDecimal *m)
15691569
else
15701570
carry = 0;
15711571
// This is one off to allow final carry
1572-
if (j < l->length-1) n.cMantissa[j+1] = e;
1572+
n.cMantissa[j+1] = e;
15731573
}
15741574
n.cMantissa[0] = carry;
15751575
NSDecimalCompact(&n);
@@ -1657,7 +1657,7 @@ static void DecimalToCharvec(const NSDecimal *n, GSDecimal *m)
16571657
error1 = NSDecimalSubtract(&n1, &n1, r, mode);
16581658
if (NSCalculationNoError != error1)
16591659
error = error1;
1660-
if (k > 0) result->cMantissa[k-1]++;
1660+
result->cMantissa[k-1]++;
16611661
}
16621662

16631663
return error;

Source/NSXMLNode.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,20 @@
8585
setTreeDoc(xmlNodePtr node, xmlDocPtr doc)
8686
{
8787
xmlDocPtr oldDoc;
88-
BOOL adoptStr;
88+
int adoptStr;
8989

9090
if (node == NULL || node->doc == doc)
9191
return;
9292

9393
oldDoc = node->doc;
94-
adoptStr = NO;
94+
adoptStr = 0;
9595

9696
/* Only adopt strings if both docs exist and have different dicts */
9797
if (oldDoc != NULL && doc != NULL
9898
&& oldDoc->dict != NULL && doc->dict != NULL
9999
&& oldDoc->dict != doc->dict)
100100
{
101-
adoptStr = YES;
101+
adoptStr = 1;
102102
}
103103
/* If new doc has no dict but old doc has dict, need to copy strings out */
104104
else if (oldDoc != NULL && oldDoc->dict != NULL

0 commit comments

Comments
 (0)