Skip to content

Commit 3dea58c

Browse files
committed
Added check for type B which is boolean in 64bit devices
1 parent 7be9a81 commit 3dea58c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

NSObject+NSCoding.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ - (void) autoEncodeWithCoder:(NSCoder *)coder
6868
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
6969
[invocation setSelector:NSSelectorFromString(key)];
7070
[invocation setTarget:self];
71-
7271
switch ([type characterAtIndex:0]) {
7372
case '@': // object
7473
if ([[type componentsSeparatedByString:@"\""] count] > 1) {
@@ -84,6 +83,7 @@ - (void) autoEncodeWithCoder:(NSCoder *)coder
8483
}
8584
}
8685
break;
86+
case 'B': // bool for 64bit
8787
case 'c': // bool
8888
[invocation invoke];
8989
[invocation getReturnValue:&boolValue];
@@ -191,6 +191,7 @@ - (void) autoDecode:(NSCoder *)coder
191191
}
192192
}
193193
break;
194+
case 'B': // bool for 64bit
194195
case 'c': // bool
195196
number = [coder decodeObjectForKey:key];
196197
b = [number boolValue];

0 commit comments

Comments
 (0)