From da7b2b1a31d14abfed7bc03822eb39ffdf8fdd20 Mon Sep 17 00:00:00 2001 From: Bart Whiteley Date: Wed, 14 Jun 2017 12:50:22 -0600 Subject: [PATCH] fix compile issue on Xcode 9 --- Source/DiffMatchPatch.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/DiffMatchPatch.m b/Source/DiffMatchPatch.m index 6af6c98..eb3b3e0 100644 --- a/Source/DiffMatchPatch.m +++ b/Source/DiffMatchPatch.m @@ -769,7 +769,7 @@ void diff_cleanupMerge(NSMutableArray **inputDiffs) indexOfCurrentDiff = indexOfCurrentDiff - count_delete - count_insert + (count_delete != 0 ? 1 : 0) + (count_insert != 0 ? 1 : 0) + 1; - } else if(indexOfCurrentDiff != 0 && [diffs[indexOfCurrentDiff - 1] operation] == DIFF_EQUAL) { + } else if(indexOfCurrentDiff != 0 && ((DMDiff *)diffs[indexOfCurrentDiff - 1]).operation == DIFF_EQUAL) { // Merge this equality with the previous one. DMDiff *prevDiff = diffs[indexOfCurrentDiff - 1]; prevDiff.text = [prevDiff.text stringByAppendingString:thisDiff.text];