aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/objc/utils/MCOIndexSet.mm2
-rw-r--r--src/objc/utils/NSIndexSet+MCO.m2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/objc/utils/MCOIndexSet.mm b/src/objc/utils/MCOIndexSet.mm
index 28ca4078..9d75900f 100644
--- a/src/objc/utils/MCOIndexSet.mm
+++ b/src/objc/utils/MCOIndexSet.mm
@@ -152,7 +152,7 @@ MCO_SYNTHESIZE_NSCODING
NSMutableIndexSet * result = [NSMutableIndexSet indexSet];
MCORange * allRanges = [self allRanges];
for(unsigned int i = 0 ; i < [self rangesCount] ; i ++) {
- [result addIndexesInRange:NSMakeRange((NSUInteger) allRanges[i].location, (NSUInteger) allRanges[i].length)];
+ [result addIndexesInRange:NSMakeRange((NSUInteger) allRanges[i].location, (NSUInteger) allRanges[i].length + 1)];
}
return result;
}
diff --git a/src/objc/utils/NSIndexSet+MCO.m b/src/objc/utils/NSIndexSet+MCO.m
index dd2b83d0..73b42c9a 100644
--- a/src/objc/utils/NSIndexSet+MCO.m
+++ b/src/objc/utils/NSIndexSet+MCO.m
@@ -16,7 +16,7 @@
MCOIndexSet * result = [MCOIndexSet indexSet];;
[self enumerateRangesUsingBlock:^(NSRange range, BOOL * stop) {
- [result addRange:MCORangeMake(range.location, range.length)];
+ [result addRange:MCORangeMake(range.location, range.length - 1)];
}];
return result;