Skip to content

Instantly share code, notes, and snippets.

@sjchmiela
Created February 14, 2019 12:12
Show Gist options
  • Save sjchmiela/626b6293aa63dfe532f0e595f180d937 to your computer and use it in GitHub Desktop.
Save sjchmiela/626b6293aa63dfe532f0e595f180d937 to your computer and use it in GitHub Desktop.
@@ -145,7 +145,8 @@ static const NSNumber *trueValue;
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:methodSignature];
[invocation setTarget:self];
[invocation setSelector:selector];
- [arguments enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
+ NSArray<id> *newArguments = [arguments copy];
+ [newArguments enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if (obj != [NSNull null]) {
[invocation setArgument:&obj atIndex:(2 + idx)];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment