Skip to content

Commit 8bdd976

Browse files
JezzJezz
authored andcommitted
1 parent 5782e5c commit 8bdd976

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed
Binary file not shown.

JJException.xcodeproj/xcuserdata/jezz.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
ignoreCount = "0"
2929
continueAfterRunningActions = "No"
3030
filePath = "JJException/ViewController.m"
31-
timestampString = "577522874.469534"
31+
timestampString = "581006976.523271"
3232
startingColumnNumber = "9223372036854775807"
3333
endingColumnNumber = "9223372036854775807"
3434
startingLineNumber = "73"

JJException/Source/MRC/NSMutableDictionary+MutableDictionaryHook.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ - (void) hookRemoveObjectForKey:(id)key {
3838
}
3939

4040
- (void) hookSetObject:(id)object forKeyedSubscript:(id<NSCopying>)key {
41-
if (object && key ) {
41+
if (key) {
4242
[self hookSetObject:object forKeyedSubscript:key];
4343
} else {
4444
handleCrashException(JJExceptionGuardDictionaryContainer,[NSString stringWithFormat:@"NSMutableDictionary setObject object:%@ and forKeyedSubscript:%@",object,key],self);

JJExceptionTests/JJExceptionTests.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ - (void)testMutableDictionaryException{
9595
NSMutableDictionary *forKeyedSubscript = @{@"name" : @"text"}.mutableCopy;
9696
NSString *subscript = nil;
9797
forKeyedSubscript[subscript] = @(25);
98+
forKeyedSubscript[@"name"] = nil;
99+
XCTAssert(forKeyedSubscript.count == 0);
98100
}
99101

100102
- (void)testZombieException{

0 commit comments

Comments
 (0)