Fix diffing algorithm not using custom comparison block

This commit is contained in:
Huy Nguyen
2016-02-24 20:32:19 -08:00
parent f948a807c9
commit bd1b195dbe

View File

@@ -53,7 +53,7 @@
for (NSInteger j = array.count; j >= 0; j--) {
if (i == self.count || j == array.count) {
lengths[i][j] = 0;
} else if ([self[i] isEqual:array[j]]) {
} else if (comparison(self[i], array[j])) {
lengths[i][j] = 1 + lengths[i+1][j+1];
} else {
lengths[i][j] = MAX(lengths[i+1][j], lengths[i][j+1]);