File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 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;
15981598 thisPointer = 1 ;
15991599 while (thisPointer < diffs.count ) {
16001600 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 ] ;
16031603 NSUInteger overlap_length1 = (NSUInteger )diff_commonOverlap ((CFStringRef)deletion, (CFStringRef)insertion);
16041604 NSUInteger overlap_length2 = (NSUInteger )diff_commonOverlap ((CFStringRef)insertion, (CFStringRef)deletion);
16051605 if (overlap_length1 >= overlap_length2) {
@@ -1629,6 +1629,8 @@ - (void)diff_cleanupSemantic:(NSMutableArray *)diffs;
16291629 thisPointer++;
16301630 }
16311631 }
1632+ [deletion release ];
1633+ [insertion release ];
16321634 thisPointer++;
16331635 }
16341636 thisPointer++;
You can’t perform that action at this time.
0 commit comments