Permalink
Browse files

Fix off by one error in extracting key path string.

  • Loading branch information...
ctsimmonds committed Aug 31, 2012
1 parent 3b529ec commit 62e9c42301c4a9b26b68eccca2aac74c272d4d7a
Showing with 2 additions and 2 deletions.
  1. +2 −2 BlocksKit/NSObject+BlockObservation.m
@@ -162,7 +162,7 @@ - (void)removeObserversWithIdentifier:(NSString *)token {
[self associateValue:nil withKey:&kObserverBlocksKey];
[withIdentifier each:^(NSString *key, BKObserver *trampoline) {
- NSString *keyPath = [key substringToIndex:key.length - token.length - 2];
+ NSString *keyPath = [key substringToIndex:key.length - token.length - 1];
if (!trampoline || ![trampoline.keyPaths containsObject:keyPath])
return;
@@ -186,4 +186,4 @@ - (void)removeAllBlockObservers {
@end
-BK_MAKE_CATEGORY_LOADABLE(NSKeyValueOvserving_BlocksKit)
+BK_MAKE_CATEGORY_LOADABLE(NSKeyValueOvserving_BlocksKit)

0 comments on commit 62e9c42

Please sign in to comment.