File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1598,8 +1598,8 @@ - (void)diff_cleanupSemantic:(NSMutableArray *)diffs;
1598
1598
thisPointer = 1 ;
1599
1599
while (thisPointer < diffs.count ) {
1600
1600
if (prevDiff.operation == DIFF_DELETE && thisDiff.operation == DIFF_INSERT) {
1601
- NSString *deletion = prevDiff.text ;
1602
- NSString *insertion = thisDiff.text ;
1601
+ NSString *deletion = [ prevDiff.text copy ] ;
1602
+ NSString *insertion = [ thisDiff.text copy ] ;
1603
1603
NSUInteger overlap_length1 = (NSUInteger )diff_commonOverlap ((CFStringRef )deletion, (CFStringRef )insertion);
1604
1604
NSUInteger overlap_length2 = (NSUInteger )diff_commonOverlap ((CFStringRef )insertion, (CFStringRef )deletion);
1605
1605
if (overlap_length1 >= overlap_length2) {
@@ -1629,6 +1629,8 @@ - (void)diff_cleanupSemantic:(NSMutableArray *)diffs;
1629
1629
thisPointer++;
1630
1630
}
1631
1631
}
1632
+ [deletion release ];
1633
+ [insertion release ];
1632
1634
thisPointer++;
1633
1635
}
1634
1636
thisPointer++;
You can’t perform that action at this time.
0 commit comments